Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/ActivityParameterMaskEditPolicy.java293
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/MaskManagedPinEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen452
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCBActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCreateLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInReadLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsReqLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsInsertAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInBroadcastSignalActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInClearAssociationActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInDestroyObjectActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInLoopNodeAsVariableLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReclassifyObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReduceActionAsCollectionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsFirstLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsSecondLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsInsertAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInBroadcastSignalActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCBActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearAssociationActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCreateLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyObjectActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInLoopNodeAsVariableLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadStructuralFeatureAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReclassifyObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReduceActionAsCollectionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsReqLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsFirstLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsSecondLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAcceptEventActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCBActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInClearStructuralFeatureActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCreateObjectActionAsResultLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsLoopVariableLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsResultLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadExtentActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadIsClassifiedObjectActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadLinkActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadSelfActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadStructuralFeatureAsResultLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadVariableActionAsResultLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReduceActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStartObjectBehaviorActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInTestIdentityActionItemLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInValSpecActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ParameterNodeNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsInsertAtLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInBroadcastSignalActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCBActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearAssociationActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCreateLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyObjectActionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInLoopNodeAsVariableLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInOActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadLinkActionAsInputValueLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReclassifyObjectActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReduceActionAsCollectionLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsReqLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActAsTargetLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsFirstLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsSecondLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeElementImportLabelDisplayEditPolicy.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeInformationFlowLabelDisplayEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations1174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml2047
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageMergeEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/messages.properties3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Messages.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java)7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/MaskManagedFloatingLabelEditPolicy.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/ActivityParameterNodeLabelHelper.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java148
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/stereotype/AppliedStereotypeParser.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/build.properties9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram-notation.elementtypesconfigurations9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.elementtypesconfigurations141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen86
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml401
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationReorientCommand.java182
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/UsageReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/AbstractionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/CommentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentRealizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConnectorEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DefaultNamedElementEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyBranchLink.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/GeneralizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceRealizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ManifestationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/OperationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PackageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PortEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PropertyEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ReceptionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/SubstitutionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/UsageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentAnnotatedElementEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintConstrainedElementEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyBranchEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeFloatingLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceRealizationEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UsageEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/AbstractionItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicy.java161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicyPCN.java161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicy.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyCN.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyPCN.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicy.java190
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyCN.java190
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyPCN.java190
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java125
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentRealizationItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConnectorItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicy.java317
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicyPCN.java317
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyNodeItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/GeneralizationItemSemanticEditPolicy.java154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicy.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicyCN.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java429
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicyPCN.java334
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicy.java190
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicyCN.java190
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ManifestationItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java692
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java587
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java587
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicyCN.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyCanonicalEditPolicy.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyForInterfaceItemSemanticEditPolicy.java53
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java429
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java315
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UsageItemSemanticEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLElementTypes.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/build.properties10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java114
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomConnectorCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomInformationFlowCreateCommand.java169
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomPortCreateCommand.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomRoleBindingCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java78
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationRoleItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationCompositeCompartmentItemSemanticEditPolicy.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationUseItemSemanticEditPolicyCN.java60
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomGraphicalNodeEditPolicy.java165
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomParameterItemSemanticEditPolicy.java98
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPortItemSemanticEditPolicy.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartCompartmentItemSemanticEditPolicyCN.java47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartItemSemanticEditPolicyCN.java142
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PortInCompartmentCreationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/ui/CollaborationRoleValidator.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram-notation.elementtypesconfigurations12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.elementtypesconfigurations1268
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen12123
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml2585
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java98
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementReorientCommand.java165
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementReorientCommand.java165
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventReorientCommand.java165
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java170
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationReorientCommand.java165
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java169
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventReorientCommand.java166
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageReorientCommand.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AbstractionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActivityEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActorEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AnyReceiveEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ArtifactEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CallEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ChangeEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ClassEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationRoleEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationUseEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CommentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentRealizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConnectorEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DataTypeEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DependencyEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentSpecificationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeviceEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationIntervalEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationObservationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationLiteralEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExecutionEnvironmentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExpressionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/FunctionBehaviorEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/GeneralizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationFlowEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationItemEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InstanceValueEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceRealizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralBooleanEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralIntegerEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralNullEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralStringEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralUnlimitedNaturalEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ManifestationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/NodeEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueBehaviorEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueExpressionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PackageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ParameterEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PortEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PrimitiveTypeEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PropertyEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ProtocolStateMachineEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RealizationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RoleBindingEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StateMachineEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StringExpressionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SubstitutionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeExpressionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeIntervalEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeObservationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UMLBaseEditHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UsageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UseCaseEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortFloatingLabelEditPart.java338
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortLinkEditPart.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java265
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java265
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java327
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentAnnotatedElementEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java70
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java70
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java117
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorEditPart.java54
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java321
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintConstrainedElementEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java136
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java136
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEventEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java334
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationEditPart.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java317
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LinkDescriptorEditPart.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java334
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java323
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java79
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java334
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java323
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java79
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java336
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java334
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java269
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java130
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationEditPart.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java315
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEventEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java379
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPart.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPartCN.java337
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java365
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationEventItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationLiteralItemSemanticEditPolicyCLN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java436
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java436
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java454
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OperationItemSemanticEditPolicyCLN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyItemSemanticEditPolicyCLN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java422
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RepresentationItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java460
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationEventSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java280
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextNonResizableEditPolicy.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextSelectionEditPolicy.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java400
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java432
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/AbstractParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/DiagramEditorContextMenuProvider.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/LoadResourceAction.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/Messages.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ModelElementSelectionPage.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizardPage.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramActionBarContributor.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramContentInitializer.java729
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java120
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java55
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdater.java12097
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java288
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLInitDiagramFileAction.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLLinkDescriptor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNodeDescriptor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java3680
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java137
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramAppearancePreferencePage.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramConnectionsPreferencePage.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramGeneralPreferencePage.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPrintingPreferencePage.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramRulersAndGridPreferencePage.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLEditPartProvider.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java239
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLIconProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLMarkerNavigationProvider.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java1163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationDecoratorProvider.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationProvider.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java1059
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLPropertySection.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLSheetLabelProvider.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.classpath14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/TODO1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/AbstractGraphicalParametricOnSelectedElementsAction.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramNameNormalizationCommand.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramQuickFormatAction.java54
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/AbstractGenericCommandHandler.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramNamePropertyTester.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramQuickFormatHandler.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/DiagramPropertyTester.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java135
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java54
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java93
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java93
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java77
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java78
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java77
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore_diagram308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag344
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ChildConfiguration.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/Configuration.java47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/DrawerConfiguration.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ElementDescriptor.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/IconDescriptor.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/LeafConfiguration.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteConfiguration.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationFactory.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationPackage.java152
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/SeparatorConfiguration.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/StackConfiguration.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolConfiguration.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolKind.java68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ChildConfigurationImpl.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ConfigurationImpl.java173
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/DrawerConfigurationImpl.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ElementDescriptorImpl.java89
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/IconDescriptorImpl.java90
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/LeafConfigurationImpl.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteConfigurationImpl.java90
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationFactoryImpl.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java151
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/SeparatorConfigurationImpl.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/StackConfigurationImpl.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ToolConfigurationImpl.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java157
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceFactoryImpl.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceImpl.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationSwitch.java259
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationXMLProcessor.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomStateResizeCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateCreationEditPolicy.java4
1123 files changed, 57534 insertions, 154629 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/ActivityParameterMaskEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/ActivityParameterMaskEditPolicy.java
new file mode 100644
index 00000000000..58f03bc792f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/ActivityParameterMaskEditPolicy.java
@@ -0,0 +1,293 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.policies;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ParameterNodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.ActivityParameterNodeLabelHelper;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+
+public class ActivityParameterMaskEditPolicy extends AbstractMaskManagedEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void addAdditionalListeners() {
+ super.addAdditionalListeners();
+ ActivityParameterNode node = getUMLElement();
+ if (node == null) {
+ return;
+ }
+ //add listner to parameter
+ addListener(node.getParameter());
+ //add listner to type
+ addListener(node.getType());
+ //add listner to states
+ for (State state : node.getInStates()) {
+ addListener(state);
+ }
+ }
+
+ /**
+ * Add this class to target's listners.
+ * @param target may be null
+ */
+ protected void addListener(Object target) {
+ if (target instanceof EObject) {
+ getDiagramEventBroker().addNotificationListener((EObject)target, this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<String> getDefaultDisplayValue() {
+ return ICustomAppearance.DEFAULT_UML_ACTIVITYPARAMETERNODE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return ActivityParameterNodeLabelHelper.getInstance().getMasks();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ActivityParameterNode getUMLElement() {
+ if (hostSemanticElement instanceof ActivityParameterNode) {
+ return (ActivityParameterNode) hostSemanticElement;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ Object object = notification.getNotifier();
+ ActivityParameterNode activityParameterNode = getUMLElement();
+ if (object == null || activityParameterNode == null) {
+ return;
+ }
+ if (object.equals(activityParameterNode)) {
+ notifyActivityParameterNodeChanged(activityParameterNode, notification);
+ } else if (isParameter(object)) {
+ notifyParameterChanged(notification);
+ } else if (isType(object)) {
+ notifyTypeChanged(notification);
+ } else if (isState(object)) {
+ notifyStateChanged(notification);
+ }
+ }
+
+ /**
+ * Checks if the given object is a Type of the ActivityParameterNode
+ */
+ protected boolean isType(Object object) {
+ if (false == object instanceof Type) {
+ return false;
+ }
+ return object.equals(getUMLElement().getType());
+ }
+
+ /**
+ * Checks if the given object is a Parameter of the ActivityParameterNode
+ */
+ protected boolean isParameter(Object object) {
+ if (false == object instanceof Parameter) {
+ return false;
+ }
+ return object.equals(getUMLElement().getParameter());
+ }
+
+ /**
+ * Checks if the given object is a State of the ActivityParameterNode
+ */
+ protected boolean isState(Object object) {
+ if (false == object instanceof State) {
+ return false;
+ }
+ return getUMLElement().getInStates().contains(object);
+ }
+
+ /**
+ * Checks if the given object is a Type of the ActivityParameterNode
+ *
+ * @param parameter
+ * the {@link Parameter} that has changed
+ * @param notification
+ * the notification send when the element has been changed
+ */
+ protected void notifyParameterChanged(Notification notification) {
+ if (UMLPackage.PARAMETER__NAME == notification.getFeatureID(Parameter.class)) {
+ refreshDisplay();
+ }
+ }
+
+ /**
+ * notifies that a type of the activity parameter node has changed.
+ *
+ * @param parameter
+ * the {@link Parameter} that has changed
+ * @param notification
+ * the notification send when the element has been changed
+ */
+ protected void notifyTypeChanged(Notification notification) {
+ if (UMLPackage.TYPE__NAME == notification.getFeatureID(notification.getNotifier().getClass())) {
+ refreshDisplay();
+ }
+ }
+
+ protected void notifyStateChanged(Notification notification) {
+ if (UMLPackage.STATE__NAME == notification.getFeatureID(notification.getNotifier().getClass())) {
+ refreshDisplay();
+ }
+ }
+
+ /**
+ * notifies that the the property has changed.
+ *
+ * @param node
+ * the ActivityParameterNode that has changed
+ * @param notification
+ * the notification send when the element has been changed
+ */
+ protected void notifyActivityParameterNodeChanged(ActivityParameterNode node, Notification notification) {
+ switch (notification.getFeatureID(ActivityParameterNode.class)) {
+ case UMLPackage.ACTIVITY_PARAMETER_NODE__NAME:
+ refreshDisplay();
+ break;
+ case UMLPackage.ACTIVITY_PARAMETER_NODE__PARAMETER:
+ case UMLPackage.ACTIVITY_PARAMETER_NODE__TYPE:
+ case UMLPackage.ACTIVITY_PARAMETER_NODE__IN_STATE:
+ switch (notification.getEventType()) {
+ case Notification.ADD:
+ addListener(notification.getNewValue());
+ refreshDisplay();
+ break;
+ case Notification.ADD_MANY:
+ if (notification.getNewValue() instanceof List<?>) {
+ List<?> addedElements = (List<?>) notification.getNewValue();
+ for (Object addedElement : addedElements) {
+ addListener(addedElement);
+ }
+ }
+ refreshDisplay();
+ break;
+ case Notification.REMOVE:
+ removeListenerFromElement(notification.getOldValue());
+ refreshDisplay();
+ break;
+ case Notification.REMOVE_MANY:
+ if (notification.getOldValue() instanceof List<?>) {
+ List<?> removedElements = (List<?>) notification.getOldValue();
+ for (Object removedElement : removedElements) {
+ removeListenerFromElement(removedElement);
+ }
+ }
+ refreshDisplay();
+ break;
+ case Notification.SET:
+ addListener(notification.getNewValue());
+ removeListenerFromElement(notification.getOldValue());
+ refreshDisplay();
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void refreshDisplay() {
+ ActivityParameterNodeLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart) getHost());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void removeAdditionalListeners() {
+ super.removeAdditionalListeners();
+ ActivityParameterNode activityParameterNode = getUMLElement();
+ if (activityParameterNode == null) {
+ return;
+ }
+ // remove listner from parameter
+ removeListenerFromElement(activityParameterNode.getParameter());
+ // remove listner from type
+ removeListenerFromElement(activityParameterNode.getType());
+ // remove listner from states
+ for (State state: activityParameterNode.getInStates()) {
+ removeListenerFromElement(state);
+ }
+ }
+
+ protected void removeListenerFromElement(Object target) {
+ if (target instanceof EObject) {
+ getDiagramEventBroker().removeNotificationListener((EObject) target, this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EditPart getHost() {
+ GraphicalEditPart ep = (GraphicalEditPart) super.getHost();
+ if (ep instanceof ParameterNodeNameEditPart) {
+ return ep;
+ }
+ return ep.getChildBySemanticHint(Integer.toString(ParameterNodeNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getView() {
+ View view = super.getView();
+ if (view instanceof Shape) {
+ return view;
+ }
+ return (View)view.eContainer();
+ }
+} \ 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/policies/MaskManagedPinEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/MaskManagedPinEditPolicy.java
new file mode 100644
index 00000000000..89125e5ce72
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/MaskManagedPinEditPolicy.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST) - Update getUMLElement()
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.policies;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.helper.PinLabelHelper;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Pin;
+
+public class MaskManagedPinEditPolicy extends AbstractMaskManagedEditPolicy {
+
+ public MaskManagedPinEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<String> getDefaultDisplayValue() {
+ return Arrays.asList(ICustomAppearance.DISP_NAME);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return PinLabelHelper.getInstance().getMasks();
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public Pin getUMLElement() {
+ return PinLabelHelper.getInstance().getUMLElement((GraphicalEditPart) getHost());
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void refreshDisplay() {
+ PinLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart) getHost());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java
new file mode 100644
index 00000000000..f4190a8e127
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java
@@ -0,0 +1,97 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.Messages;
+import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Pin;
+import org.eclipse.uml2.uml.TypedElement;
+
+/**
+ * Helper for labels displaying {@link Pin}
+ */
+public class PinLabelHelper extends StereotypedElementLabelHelper {
+
+ private static PinLabelHelper labelHelper;
+
+ private final Map<String, String> masks = new HashMap<String, String>();
+
+ /**
+ * {@inheritDoc}
+ */
+ public static PinLabelHelper getInstance() {
+ if (labelHelper == null) {
+ labelHelper = new PinLabelHelper();
+ }
+ return labelHelper;
+ }
+
+
+ private PinLabelHelper() {
+ masks.put(ICustomAppearance.DISP_TYPE, Messages.ICustomAppearance_PIN_DISP_TYPE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @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();
+ }
+ NamedElement namedElement = getUMLElement(editPart);
+ return namedElement != null ? getCustomLabel(namedElement, displayValue) : "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ private String getCustomLabel(NamedElement namedElement, Collection<String> maskValues) {
+ StringBuffer buffer = new StringBuffer();
+ if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
+ buffer.append(" ");
+ buffer.append(namedElement.getName());
+ }
+ if (namedElement instanceof TypedElement) {
+ if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ if (((TypedElement) namedElement).getType() != null) {
+ buffer.append(": " + ((TypedElement) namedElement).getType().getName());
+ } else {
+ buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
+ }
+ }
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Map<String, String> getMasks() {
+ return masks;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Pin getUMLElement(GraphicalEditPart editPart) {
+ Element element = super.getUMLElement(editPart);
+ return element instanceof Pin ? (Pin) element : null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
index 31208082513..a110d30bb8a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
@@ -178,6 +178,9 @@ public class JoinSpecParser extends MessageFormatParser implements ISemanticPars
* @return true if is valid, false otherwise
*/
private boolean isValidFeature(EStructuralFeature feature) {
+ if (feature == null){
+ return false;
+ }
return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getJoinNode_JoinSpec().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
}
}
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 3cc26ec2ab8..6e8730fffe5 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
@@ -1780,6 +1780,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -1881,6 +1885,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -1982,6 +1990,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2069,6 +2081,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2261,6 +2277,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2366,6 +2386,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2471,6 +2495,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2562,6 +2590,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2752,6 +2784,10 @@
notationViewFactoryClassName="ActionInputPinLabelViewFactory">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
@@ -2861,6 +2897,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -2967,6 +3007,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -3058,6 +3102,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -3150,6 +3198,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -3253,6 +3305,10 @@
notationViewFactoryClassName="ActionInputPinLabelViewFactory">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
@@ -3362,6 +3418,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -4865,6 +4925,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -4967,6 +5031,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5069,6 +5137,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5157,6 +5229,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5259,6 +5335,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5361,6 +5441,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5550,6 +5634,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5652,6 +5740,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5754,6 +5846,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5842,6 +5938,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -5944,6 +6044,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -6046,6 +6150,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -6104,6 +6212,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <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.activity.edit.policies.ActivityParameterMaskEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityParameterNode"/>
@@ -6138,6 +6250,10 @@
xsi:type="gmfgen:ParentAssignedViewmap"
getterName="getNameLabel"
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <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.activity.edit.policies.ActivityParameterMaskEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.15"/>
</labels>
@@ -6336,6 +6452,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -6528,6 +6648,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7012,6 +7136,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7111,6 +7239,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7211,6 +7343,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7298,6 +7434,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7385,6 +7525,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7606,6 +7750,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7688,6 +7836,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7785,6 +7937,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -7882,6 +8038,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -8265,6 +8425,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -8562,6 +8726,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -8808,6 +8976,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -8891,6 +9063,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9084,6 +9260,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9172,6 +9352,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9260,6 +9444,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9348,6 +9536,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9449,6 +9641,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9550,6 +9746,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9651,6 +9851,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9752,6 +9956,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9853,6 +10061,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -9953,6 +10165,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10144,6 +10360,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10230,6 +10450,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10329,6 +10553,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10530,6 +10758,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10723,6 +10955,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10811,6 +11047,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -10899,6 +11139,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11000,6 +11244,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11101,6 +11349,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11202,6 +11454,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11408,6 +11664,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11510,6 +11770,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11612,6 +11876,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -11998,6 +12266,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12082,6 +12354,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12166,6 +12442,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12264,6 +12544,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12362,6 +12646,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12446,6 +12734,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12543,6 +12835,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12736,6 +13032,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12816,6 +13116,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12896,6 +13200,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -12976,6 +13284,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13069,6 +13381,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13162,6 +13478,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13255,6 +13575,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13455,6 +13779,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13539,6 +13867,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13623,6 +13955,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -13717,6 +14053,10 @@
itemSemanticEditPolicyClassName="ActionInputPinInClearStructuralFeatureActionAsObjectLabelItemSemanticEditPolicy">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
@@ -13917,6 +14257,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14001,6 +14345,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14098,6 +14446,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14296,6 +14648,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14380,6 +14736,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14464,6 +14824,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14561,6 +14925,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14758,6 +15126,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14842,6 +15214,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -14939,6 +15315,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15131,6 +15511,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15215,6 +15599,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15312,6 +15700,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15505,6 +15897,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15685,6 +16081,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15769,6 +16169,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -15866,6 +16270,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16059,6 +16467,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16143,6 +16555,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16227,6 +16643,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16324,6 +16744,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16517,6 +16941,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16601,6 +17029,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16685,6 +17117,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16782,6 +17218,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -16974,6 +17414,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -17058,6 +17502,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
@@ -17155,6 +17603,10 @@
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <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.activity.edit.policies.MaskManagedPinEditPolicy"/>
<modelFacet
parser="/0/@labelParsers/@implementations.6"/>
</labels>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCBActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCBActLabelEditPart.java
index 23d6815cda1..f7c6cfae3d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCBActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCBActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInCBActLabelEditPart extends PapyrusLabelEditPart imp
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActAsTargetLabelEditPart.java
index dccaaa2a53d..a39111aaa01 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInCOActAsTargetLabelEditPart extends PapyrusLabelEdit
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActLabelEditPart.java
index 1ab2c98bd88..7e67bc2f095 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInCOActLabelEditPart extends PapyrusLabelEditPart imp
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
index 376d4fee25e..7130c8ff571 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionInputPinInClearStructuralFeatureActionAsObjectLabelEditPart e
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCreateLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCreateLinkActionAsInputValueLabelEditPart.java
index 8719571e1d3..7ebc094f0e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCreateLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInCreateLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionInputPinInCreateLinkActionAsInputValueLabelEditPart extends P
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart.java
index 7f0143b7dff..15497ee2ada 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionInputPinInDestroyLinkActionAsInputValueLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInOActLabelEditPart.java
index 018390645fe..2bda213e7ae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInOActLabelEditPart extends PapyrusLabelEditPart impl
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInReadLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInReadLinkActionAsInputValueLabelEditPart.java
index a830f207b48..cfca8be82b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInReadLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInReadLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionInputPinInReadLinkActionAsInputValueLabelEditPart extends Pap
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsReqLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsReqLabelEditPart.java
index 0b46c4b660e..8f416cbe9a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsReqLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsReqLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInSendObjActAsReqLabelEditPart extends PapyrusLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsTargetLabelEditPart.java
index 16ac32e18d3..234a91e4bd2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendObjActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInSendObjActAsTargetLabelEditPart extends PapyrusLabe
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActAsTargetLabelEditPart.java
index d5d962b5d78..f77fa0f09af 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInSendSigActAsTargetLabelEditPart extends PapyrusLabe
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActLabelEditPart.java
index 9cb62dc7114..4421b073f64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionInputPinInSendSigActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ActionInputPinInSendSigActLabelEditPart extends PapyrusLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
index d732e5fc54a..43066782d6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart ex
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
index 43bed1f752a..3d7cd23145d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInAddStructuralFeatureValueActionAsObjectLabelEditPart ext
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
index 53099bb5fed..dc59e1a3de2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInAddStructuralFeatureValueActionAsValueLabelEditPart exte
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsInsertAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsInsertAtLabelEditPart.java
index b7b9ecb36bd..e05ad3f50fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsInsertAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsInsertAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInAddVariableValueActionAsInsertAtLabelEditPart extends Pa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsValueLabelEditPart.java
index 8343d0869d9..29f8c3b36cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInAddVariableValueActionAsValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInAddVariableValueActionAsValueLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInBroadcastSignalActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInBroadcastSignalActionLabelEditPart.java
index db94250e898..7d6dd15e6ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInBroadcastSignalActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInBroadcastSignalActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInBroadcastSignalActionLabelEditPart extends PapyrusLabelE
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInClearAssociationActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInClearAssociationActionAsObjectLabelEditPart.java
index 82a1459f883..60512a890a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInClearAssociationActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInClearAssociationActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInClearAssociationActionAsObjectLabelEditPart extends Papy
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInDestroyObjectActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInDestroyObjectActionLabelEditPart.java
index c5bdaf6e8af..bc5ed61ef15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInDestroyObjectActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInDestroyObjectActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInDestroyObjectActionLabelEditPart extends PapyrusLabelEdi
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInLoopNodeAsVariableLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInLoopNodeAsVariableLabelEditPart.java
index eef6b71ba44..d347fdc497a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInLoopNodeAsVariableLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInLoopNodeAsVariableLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInLoopNodeAsVariableLabelEditPart extends PapyrusLabelEdit
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
index 4bc2f9fd22b..f97c1151731 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInReadIsClassifiedObjectActionAsObjectLabelEditPart extend
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReclassifyObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReclassifyObjectActionAsObjectLabelEditPart.java
index 7d4a66e5706..52055d1350c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReclassifyObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReclassifyObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInReclassifyObjectActionAsObjectLabelEditPart extends Papy
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReduceActionAsCollectionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReduceActionAsCollectionLabelEditPart.java
index 6a6234b345c..ea89d145da7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReduceActionAsCollectionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInReduceActionAsCollectionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInReduceActionAsCollectionLabelEditPart extends PapyrusLab
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
index 7b5708d9575..bb38fa89041 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInStartClassifierBehaviorActionAsObjectLabelEditPart exten
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
index c9819d8c9a8..0eb86cce3ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInStartObjectBehaviorActionAsArgumentLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
index e4fa71c319e..d138f879f11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInStartObjectBehaviorActionAsObjectLabelEditPart extends P
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
index e261183bddf..d67e8ea162d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsFirstLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsFirstLabelEditPart.java
index 505e1b694dc..14e1c1892a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsFirstLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsFirstLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInTestIdentityActionAsFirstLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsSecondLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsSecondLabelEditPart.java
index 9e87afa4b29..cf424814c3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsSecondLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActionPinInTestIdentityActionAsSecondLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ActionPinInTestIdentityActionAsSecondLabelEditPart extends PapyrusL
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
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 ae9697df0e9..19cd30cb786 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
@@ -30,8 +30,10 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+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.uml.diagram.activity.edit.policies.ActivityParameterMaskEditPolicy;
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.UMLVisualIDRegistry;
@@ -81,6 +83,7 @@ public class ActivityParameterNodeEditPart extends RoundedBorderNamedElementEdit
installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new PinLayoutEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new ActivityParameterMaskEditPolicy());
// 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);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
index f31670f81cf..f127357a5cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInAddStructuralFeatureValueActionAsInserAtLabelEditPart ext
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
index 33897ee6cf4..0acd8084fd5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart exte
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.java
index a62539d1284..5ce79f12ee8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart exte
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsInsertAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsInsertAtLabelEditPart.java
index fc06cfc0da8..2823ffb1366 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsInsertAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsInsertAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInAddVariableValueActionAsInsertAtLabelEditPart extends Pap
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsValueLabelEditPart.java
index 991ce00fb24..553695bfcfa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInAddVariableValueActionAsValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInAddVariableValueActionAsValueLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInBroadcastSignalActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInBroadcastSignalActionLabelEditPart.java
index 668cabf654b..8c85db975ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInBroadcastSignalActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInBroadcastSignalActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInBroadcastSignalActionLabelEditPart extends PapyrusLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCBActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCBActLabelEditPart.java
index 3926cab28b3..cafe0b46e2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCBActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCBActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInCBActLabelEditPart extends PapyrusLabelEditPart implement
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActAsTargetLabelEditPart.java
index ab3d2ff8146..3167c4926fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInCOActAsTargetLabelEditPart extends PapyrusLabelEditPart i
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActLabelEditPart.java
index 5e15e8d6a4b..b0bf223c56e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInCOActLabelEditPart extends PapyrusLabelEditPart implement
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearAssociationActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearAssociationActionAsObjectLabelEditPart.java
index c0f4e9ae5db..e5edb6e9b58 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearAssociationActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearAssociationActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInClearAssociationActionAsObjectLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
index 8d4a12777e1..e9ac4b31bc5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInClearStructuralFeatureActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInClearStructuralFeatureActionAsObjectLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCreateLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCreateLinkActionAsInputValueLabelEditPart.java
index f2f77e12fc7..8d50af06991 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCreateLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInCreateLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInCreateLinkActionAsInputValueLabelEditPart extends Papyrus
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyLinkActionAsInputValueLabelEditPart.java
index 9b350a3e64d..c1cdc3610db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInDestroyLinkActionAsInputValueLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyObjectActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyObjectActionLabelEditPart.java
index 84c5f133909..60a4c07a361 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyObjectActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInDestroyObjectActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInDestroyObjectActionLabelEditPart extends PapyrusLabelEdit
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInLoopNodeAsVariableLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInLoopNodeAsVariableLabelEditPart.java
index 32f9090f207..31b195775bd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInLoopNodeAsVariableLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInLoopNodeAsVariableLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInLoopNodeAsVariableLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInOActLabelEditPart.java
index 7fa75200c6f..19cafac4baf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInOActLabelEditPart extends PapyrusLabelEditPart implements
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
index 0289414757c..6c2951e9fe7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInReadIsClassifiedObjectActionAsObjectLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadLinkActionAsInputValueLabelEditPart.java
index 637d6d93ed0..e9d3052c748 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInReadLinkActionAsInputValueLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadStructuralFeatureAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadStructuralFeatureAsObjectLabelEditPart.java
index 73eb1e7d6d4..87cf8d9dd60 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadStructuralFeatureAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReadStructuralFeatureAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class InputPinInReadStructuralFeatureAsObjectLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReclassifyObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReclassifyObjectActionAsObjectLabelEditPart.java
index 633bfa0e5ed..ac62a323c7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReclassifyObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReclassifyObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInReclassifyObjectActionAsObjectLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReduceActionAsCollectionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReduceActionAsCollectionLabelEditPart.java
index 89bac79eba6..96e946bb8b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReduceActionAsCollectionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInReduceActionAsCollectionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInReduceActionAsCollectionLabelEditPart extends PapyrusLabe
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsReqLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsReqLabelEditPart.java
index 32d4aa84fcc..4d96ac5a57e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsReqLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsReqLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInSendObjActAsReqLabelEditPart extends PapyrusLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsTargetLabelEditPart.java
index 9376a4e3ef3..a081f626d33 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendObjActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInSendObjActAsTargetLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActAsTargetLabelEditPart.java
index 07775697286..1f0b3ea599d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInSendSigActAsTargetLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActLabelEditPart.java
index 3b1e5f16940..70b86c832b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInSendSigActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class InputPinInSendSigActLabelEditPart extends PapyrusLabelEditPart impl
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
index a7bb0169052..5a60b886546 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInStartClassifierBehaviorActionAsObjectLabelEditPart extend
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
index 7b6d7b687c6..7289c746cc4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInStartObjectBehaviorActionAsArgumentLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
index df760f7ee16..7d440ac0f02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStartObjectBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInStartObjectBehaviorActionAsObjectLabelEditPart extends Pa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
index c216107b591..7f819a8d458 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsFirstLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsFirstLabelEditPart.java
index d47684177b9..a196eddc3dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsFirstLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsFirstLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInTestIdentityActionAsFirstLabelEditPart extends PapyrusLab
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsSecondLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsSecondLabelEditPart.java
index fce8d581e47..1f711ec1938 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsSecondLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InputPinInTestIdentityActionAsSecondLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class InputPinInTestIdentityActionAsSecondLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAcceptEventActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAcceptEventActionLabelEditPart.java
index 1ac3d01192b..a15e664f9c6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAcceptEventActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAcceptEventActionLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class OutputPinInAcceptEventActionLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.java
index e540a71f3ec..63b82bed536 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart ex
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCBActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCBActLabelEditPart.java
index 09d7132af98..450496e79f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCBActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCBActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class OutputPinInCBActLabelEditPart extends PapyrusLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCOActLabelEditPart.java
index a8023e0c081..01bd5c0b758 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class OutputPinInCOActLabelEditPart extends PapyrusLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInClearStructuralFeatureActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInClearStructuralFeatureActionLabelEditPart.java
index 977fa9b7bc5..e58a151afa0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInClearStructuralFeatureActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInClearStructuralFeatureActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInClearStructuralFeatureActionLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCreateObjectActionAsResultLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCreateObjectActionAsResultLabelEditPart.java
index 28dcbc0b2a1..51f08576340 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCreateObjectActionAsResultLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInCreateObjectActionAsResultLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInCreateObjectActionAsResultLabelEditPart extends PapyrusL
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputEditPart.java
index ee8f4afaf46..4b02f8ce698 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputEditPart.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+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.uml.diagram.activity.edit.part.AbstractPinEditPart;
@@ -32,6 +33,7 @@ import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPol
import org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedFloatingLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputLabelEditPart.java
index 883b6d76c94..7d44707a8e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsBodyOutputLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -59,6 +60,7 @@ 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.editpolicies.MaskManagedFloatingLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -136,6 +138,7 @@ public class OutputPinInLoopNodeAsBodyOutputLabelEditPart extends PapyrusLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsLoopVariableLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsLoopVariableLabelEditPart.java
index 45648c9a2ab..bd3dac05d7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsLoopVariableLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsLoopVariableLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInLoopNodeAsLoopVariableLabelEditPart extends PapyrusLabel
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsResultLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsResultLabelEditPart.java
index d7ee65893f9..4c812a6a8c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsResultLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInLoopNodeAsResultLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInLoopNodeAsResultLabelEditPart extends PapyrusLabelEditPa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInOActLabelEditPart.java
index 9778441d439..55259b72db7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class OutputPinInOActLabelEditPart extends PapyrusLabelEditPart implement
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadExtentActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadExtentActionLabelEditPart.java
index 4b45f265958..76f8e49168b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadExtentActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadExtentActionLabelEditPart.java
@@ -51,6 +51,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInReadExtentActionLabelEditPart extends AbstractLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadIsClassifiedObjectActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadIsClassifiedObjectActionLabelEditPart.java
index 5560fd26403..6abd14b7cdd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadIsClassifiedObjectActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadIsClassifiedObjectActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInReadIsClassifiedObjectActionLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadLinkActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadLinkActionLabelEditPart.java
index 2e61fb99b09..1a96e07f65b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadLinkActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadLinkActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInReadLinkActionLabelEditPart extends PapyrusLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadSelfActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadSelfActionLabelEditPart.java
index e53b434a1d5..819e8d705c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadSelfActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadSelfActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInReadSelfActionLabelEditPart extends PapyrusLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadStructuralFeatureAsResultLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadStructuralFeatureAsResultLabelEditPart.java
index 42bc031b407..ceb14580ac6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadStructuralFeatureAsResultLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadStructuralFeatureAsResultLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInReadStructuralFeatureAsResultLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadVariableActionAsResultLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadVariableActionAsResultLabelEditPart.java
index 6e20eee533b..4906ec15c16 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadVariableActionAsResultLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReadVariableActionAsResultLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -136,6 +137,7 @@ public class OutputPinInReadVariableActionAsResultLabelEditPart extends PapyrusL
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReduceActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReduceActionLabelEditPart.java
index f57f53ce153..4dfe1d4254e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReduceActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInReduceActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInReduceActionLabelEditPart extends PapyrusLabelEditPart i
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStartObjectBehaviorActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStartObjectBehaviorActionLabelEditPart.java
index 93a3f6a936f..887504c8e75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStartObjectBehaviorActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStartObjectBehaviorActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInStartObjectBehaviorActionLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
index c6bd5a3e739..9c57831d00a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInTestIdentityActionItemLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInTestIdentityActionItemLabelEditPart.java
index 1c34701594c..32509589c12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInTestIdentityActionItemLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInTestIdentityActionItemLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class OutputPinInTestIdentityActionItemLabelEditPart extends PapyrusLabel
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInValSpecActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInValSpecActLabelEditPart.java
index b9df7606ac2..c8ea0b6e24e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInValSpecActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OutputPinInValSpecActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class OutputPinInValSpecActLabelEditPart extends PapyrusLabelEditPart imp
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ParameterNodeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ParameterNodeNameEditPart.java
index c2daa08e5e7..42fb44b30b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ParameterNodeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ParameterNodeNameEditPart.java
@@ -50,6 +50,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirect
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.activity.edit.policies.ActivityParameterMaskEditPolicy;
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;
@@ -127,6 +128,7 @@ public class ParameterNodeNameEditPart extends PapyrusCompartmentEditPart implem
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new ActivityParameterMaskEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
index 0a894f61d2a..efeebe5fc28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInAddStructuralFeatureValueActionAsInserAtLabelEditPart ext
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
index f61deac8c30..4320b94a8e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInAddStructuralFeatureValueActionAsObjectLabelEditPart exte
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
index a9b1022cb82..327f6e2c459 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInAddStructuralFeatureValueActionAsValueLabelEditPart exten
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsInsertAtLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsInsertAtLabelEditPart.java
index d0fbd381700..2538e97e881 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsInsertAtLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsInsertAtLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInAddVariableValueActionAsInsertAtLabelEditPart extends Pap
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsValueLabelEditPart.java
index 854491dbea1..a5fb3c32b89 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInAddVariableValueActionAsValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInAddVariableValueActionAsValueLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInBroadcastSignalActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInBroadcastSignalActionLabelEditPart.java
index 79762d2b744..aa5d431ac36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInBroadcastSignalActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInBroadcastSignalActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInBroadcastSignalActionLabelEditPart extends PapyrusLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCBActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCBActLabelEditPart.java
index d764a389056..97039e36e6b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCBActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCBActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInCBActLabelEditPart extends PapyrusLabelEditPart implement
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActAsTargetLabelEditPart.java
index c665f28e4f6..7221ce5dc6b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInCOActAsTargetLabelEditPart extends PapyrusLabelEditPart i
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActLabelEditPart.java
index 6e81e8cb426..d88cbde17e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInCOActLabelEditPart extends PapyrusLabelEditPart implement
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearAssociationActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearAssociationActionAsObjectLabelEditPart.java
index 1be03120e39..307041b08fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearAssociationActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearAssociationActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInClearAssociationActionAsObjectLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart.java
index 6b1f15848e7..7b6ff9e3587 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInClearStructuralFeatureActionAsObjectLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCreateLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCreateLinkActionAsInputValueLabelEditPart.java
index 217ea765f4c..5fd0a1ee195 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCreateLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInCreateLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInCreateLinkActionAsInputValueLabelEditPart extends Papyrus
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyLinkActionAsInputValueLabelEditPart.java
index 4f95bb6699e..2cc44d32d19 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInDestroyLinkActionAsInputValueLabelEditPart extends Papyru
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyObjectActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyObjectActionLabelEditPart.java
index 82d9f4d7c79..42c05be4c6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyObjectActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInDestroyObjectActionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInDestroyObjectActionLabelEditPart extends PapyrusLabelEdit
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInLoopNodeAsVariableLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInLoopNodeAsVariableLabelEditPart.java
index 0b3cb81ddc6..f9bbb14fa23 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInLoopNodeAsVariableLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInLoopNodeAsVariableLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInLoopNodeAsVariableLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInOActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInOActLabelEditPart.java
index 7b1f81f11de..9c7d5eca08a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInOActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInOActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInOActLabelEditPart extends PapyrusLabelEditPart implements
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
index d937c531ed7..6fa273400e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInReadIsClassifiedObjectActionAsObjectLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadLinkActionAsInputValueLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadLinkActionAsInputValueLabelEditPart.java
index a6c182420cc..63c180c895e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadLinkActionAsInputValueLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReadLinkActionAsInputValueLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInReadLinkActionAsInputValueLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReclassifyObjectActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReclassifyObjectActionAsObjectLabelEditPart.java
index dc89d56cbcd..1f5928eaee1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReclassifyObjectActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReclassifyObjectActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInReclassifyObjectActionAsObjectLabelEditPart extends Papyr
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReduceActionAsCollectionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReduceActionAsCollectionLabelEditPart.java
index 8ce0c631e6c..8cafb8c4cbb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReduceActionAsCollectionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInReduceActionAsCollectionLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInReduceActionAsCollectionLabelEditPart extends PapyrusLabe
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsReqLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsReqLabelEditPart.java
index 25fb2cdc530..fea2869fdc8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsReqLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsReqLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInSendObjActAsReqLabelEditPart extends PapyrusLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsTargetLabelEditPart.java
index 079ac0c4cf4..b762af31047 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendObjActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInSendObjActAsTargetLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActAsTargetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActAsTargetLabelEditPart.java
index 0943e2524b8..1186b410289 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActAsTargetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActAsTargetLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInSendSigActAsTargetLabelEditPart extends PapyrusLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActLabelEditPart.java
index 1719833687e..3a1ea3c75d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInSendSigActLabelEditPart.java
@@ -65,6 +65,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -141,6 +142,7 @@ public class ValuePinInSendSigActLabelEditPart extends PapyrusLabelEditPart impl
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
index 5d087e2c36e..264a3362f08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInStartClassifierBehaviorActionAsObjectLabelEditPart extend
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
index e775977e39c..880f2a55b22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInStartObjectBehaviorActionAsArgumentLabelEditPart extends
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart.java
index 0a564ea8ee8..ac4aca9cba0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInStartObjectBehaviorActionAsObjectLabelEditPart extends Pa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
index bdc1302b5f0..42ff20e7289 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInStructuredActivityNodeAsStructuredNodeInputsLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsFirstLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsFirstLabelEditPart.java
index 6f9d04efeff..2eacbdf8411 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsFirstLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsFirstLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInTestIdentityActionAsFirstLabelEditPart extends PapyrusLab
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsSecondLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsSecondLabelEditPart.java
index c230fc0cfba..8be3455c2f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsSecondLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValuePinInTestIdentityActionAsSecondLabelEditPart.java
@@ -52,6 +52,7 @@ 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.activity.edit.policies.MaskManagedPinEditPolicy;
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;
@@ -135,6 +136,7 @@ public class ValuePinInTestIdentityActionAsSecondLabelEditPart extends PapyrusLa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedPinEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeElementImportLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeElementImportLabelDisplayEditPolicy.java
deleted file mode 100644
index fc7971086ad..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeElementImportLabelDisplayEditPolicy.java
+++ /dev/null
@@ -1,33 +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:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
-
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.uml2.uml.ElementImport;
-
-/**
- * Edit Policy for Applied Stereotype Label for {@link ElementImport}.
- * <p>
- * It simply adds a tag "import" to the label. Thanks to GMF, it is not possible to call a cTor with a parameter. So it calls super cTor with the "import" parameter
- * </p>
- */
-public class AppliedStereotypeElementImportLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
-
- /**
- * Creates a new AppliedStereotypeElementImportLabelDisplayEditPolicy, with the correct tag.
- */
- public AppliedStereotypeElementImportLabelDisplayEditPolicy() {
- super("Import");
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeInformationFlowLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeInformationFlowLabelDisplayEditPolicy.java
deleted file mode 100644
index 5c23528d9e1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeInformationFlowLabelDisplayEditPolicy.java
+++ /dev/null
@@ -1,30 +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:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
-
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.uml2.uml.InformationFlow;
-
-/**
- * Edit Policy for Applied Stereotype Label for {@link InformationFlow}.
- */
-public class AppliedStereotypeInformationFlowLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
-
- /**
- * Creates the EditPolicy, with the correct tag.
- */
- public AppliedStereotypeInformationFlowLabelDisplayEditPolicy() {
- super("flow"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
index ff7df039e9a..c8cea05014b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDepende
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeInterfaceRealizationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageMergeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeSubstitutionEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeUsageEditPart;
@@ -33,6 +34,8 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchRoleEdi
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNameEditPart;
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.ContextLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.OperationForClassEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.OperationForComponentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.OperationForDataTypeEditPart;
@@ -44,6 +47,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyForSignalEditPar
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyforDataTypeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.parsers.MessageFormatParser;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.parser.custom.AssociationEndParser;
import org.eclipse.papyrus.uml.diagram.common.parser.custom.AssociationMultiplicityParser;
import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
@@ -65,8 +69,11 @@ public class CustomUMLParserProvider extends UMLParserProvider {
}
protected IParser getAppliedStereotypeParser() {
- IParser parser = new AppliedStereotypeParser();
- return parser;
+ return new AppliedStereotypeParser();
+ }
+
+ protected IParser getAppliedStereotypeParser(String defaultPrintString) {
+ return new AppliedStereotypeParser(defaultPrintString);
}
protected IParser getAssociationBranchRole() {
@@ -170,15 +177,21 @@ public class CustomUMLParserProvider extends UMLParserProvider {
case AppliedStereotypeRealizationEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeAbstractionEditPart.VISUAL_ID:
- return getAppliedStereotypeParser();
+ return getAppliedStereotypeParser("abstraction"); //$NON-NLS-1$
case AppliedStereotypeUsageEditPart.VISUAL_ID:
- return getAppliedStereotypeParser();
+ return getAppliedStereotypeParser("use"); //$NON-NLS-1$
case AppliedStereotypeDependencyEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeElementImportEditPart.VISUAL_ID:
- return getAppliedStereotypeParser();
+ return getAppliedStereotypeParser("Import"); //$NON-NLS-1$
case AppliedStereotypePackageImportEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
+ case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
+ return getAppliedStereotypeParser("flow"); //$NON-NLS-1$
+ case ContextLinkAppliedStereotypeEditPart.VISUAL_ID:
+ return getAppliedStereotypeParser(CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.APPLIED_STEREOTYPE_LABEL);
+ case AppliedStereotypePackageMergeEditPart.VISUAL_ID:
+ return getAppliedStereotypeParser("merge"); //$NON-NLS-1$
}
return super.getParser(visualID);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations
index 979b16d2987..c955ea5acd4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations
@@ -1,388 +1,1162 @@
<?xml version="1.0" encoding="ASCII"?>
-<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmi:id="_rWI4YHPzEeSnGJwaJWHCSg" name="PapyrusUMLClassDiagram" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxfnPzEeSnGJwaJWHCSg" name="Abstraction" identifier="org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006" hint="4006">
- <iconEntry xmi:id="_rWNxf3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+<elementtypesconfigurations:ElementTypeSetConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0"
+ xmi:id="_rWI4YHPzEeSnGJwaJWHCSg"
+ name="PapyrusUMLClassDiagram"
+ metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxfnPzEeSnGJwaJWHCSg"
+ name="Abstraction"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006"
+ hint="4006">
+ <iconEntry
+ xmi:id="_rWNxf3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxSnPzEeSnGJwaJWHCSg" name="Association Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013" hint="2013">
- <iconEntry xmi:id="_rWNxS3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/AssociationClass.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxSnPzEeSnGJwaJWHCSg"
+ name="Association Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013"
+ hint="2013">
+ <iconEntry
+ xmi:id="_rWNxS3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/AssociationClass.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.AssociationClass</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxcHPzEeSnGJwaJWHCSg" name="Association Class Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_4017" hint="4017">
- <iconEntry xmi:id="_rWNxcXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/AssociationClass.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxcHPzEeSnGJwaJWHCSg"
+ name="Association Class Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_4017"
+ hint="4017">
+ <iconEntry
+ xmi:id="_rWNxcXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/AssociationClass.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.AssociationClass</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxTHPzEeSnGJwaJWHCSg" name="Association Node" identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_2015" hint="2015">
- <iconEntry xmi:id="_rWNxTXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Association.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxTHPzEeSnGJwaJWHCSg"
+ name="Association Node"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"
+ hint="2015">
+ <iconEntry
+ xmi:id="_rWNxTXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Association.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxcnPzEeSnGJwaJWHCSg" name="Association Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_4001" hint="4001">
- <iconEntry xmi:id="_rWNxc3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Association.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxcnPzEeSnGJwaJWHCSg"
+ name="Association Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_4001"
+ hint="4001">
+ <iconEntry
+ xmi:id="_rWNxc3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Association.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxdHPzEeSnGJwaJWHCSg" name="Association Branch Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_4019" hint="4019">
- <iconEntry xmi:id="_rWNxdXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Association.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxdHPzEeSnGJwaJWHCSg"
+ name="Association Branch Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Association_4019"
+ hint="4019">
+ <iconEntry
+ xmi:id="_rWNxdXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Association.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxXnPzEeSnGJwaJWHCSg" name="Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_2008" hint="2008">
- <iconEntry xmi:id="_rWNxX3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxXnPzEeSnGJwaJWHCSg"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_2008"
+ hint="2008">
+ <iconEntry
+ xmi:id="_rWNxX3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw7nPzEeSnGJwaJWHCSg" name="Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3004" hint="3004">
- <iconEntry xmi:id="_rWNw73PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw7nPzEeSnGJwaJWHCSg"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"
+ hint="3004">
+ <iconEntry
+ xmi:id="_rWNw73PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw8HPzEeSnGJwaJWHCSg" name="Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3008" hint="3008">
- <iconEntry xmi:id="_rWNw8XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw8HPzEeSnGJwaJWHCSg"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3008"
+ hint="3008">
+ <iconEntry
+ xmi:id="_rWNw8XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxIHPzEeSnGJwaJWHCSg" name="Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3010" hint="3010">
- <iconEntry xmi:id="_rWNxIXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxIHPzEeSnGJwaJWHCSg"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3010"
+ hint="3010">
+ <iconEntry
+ xmi:id="_rWNxIXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw7HPzEeSnGJwaJWHCSg" name="Class" identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3014" hint="3014">
- <iconEntry xmi:id="_rWNw7XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw7HPzEeSnGJwaJWHCSg"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Class_3014"
+ hint="3014">
+ <iconEntry
+ xmi:id="_rWNw7XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxAHPzEeSnGJwaJWHCSg" name="Classifier Template Parameter" identifier="org.eclipse.papyrus.uml.diagram.clazz.ClassifierTemplateParameter_3031" hint="3031">
- <iconEntry xmi:id="_rWNxAXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/ClassifierTemplateParameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxAHPzEeSnGJwaJWHCSg"
+ name="Classifier Template Parameter"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ClassifierTemplateParameter_3031"
+ hint="3031">
+ <iconEntry
+ xmi:id="_rWNxAXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/ClassifierTemplateParameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.ClassifierTemplateParameter</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxjnPzEeSnGJwaJWHCSg" name="Comment Annotated Element" identifier="org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013" hint="4013">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxjnPzEeSnGJwaJWHCSg"
+ name="Comment Annotated Element"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"
+ hint="4013">
<specializedTypesID>org.eclipse.papyrus.uml.Comment.AnnotatedElements</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxZnPzEeSnGJwaJWHCSg" name="Comment" identifier="org.eclipse.papyrus.uml.diagram.clazz.Comment_2012" hint="2012">
- <iconEntry xmi:id="_rWNxZ3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxZnPzEeSnGJwaJWHCSg"
+ name="Comment"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"
+ hint="2012">
+ <iconEntry
+ xmi:id="_rWNxZ3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxJnPzEeSnGJwaJWHCSg" name="Comment" identifier="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028" hint="3028">
- <iconEntry xmi:id="_rWNxJ3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxJnPzEeSnGJwaJWHCSg"
+ name="Comment"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"
+ hint="3028">
+ <iconEntry
+ xmi:id="_rWNxJ3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxUHPzEeSnGJwaJWHCSg" name="Component" identifier="org.eclipse.papyrus.uml.diagram.clazz.Component_2002" hint="2002">
- <iconEntry xmi:id="_rWNxUXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Component.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxUHPzEeSnGJwaJWHCSg"
+ name="Component"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Component_2002"
+ hint="2002">
+ <iconEntry
+ xmi:id="_rWNxUXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Component.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxEnPzEeSnGJwaJWHCSg" name="Component" identifier="org.eclipse.papyrus.uml.diagram.clazz.Component_3021" hint="3021">
- <iconEntry xmi:id="_rWNxE3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Component.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxEnPzEeSnGJwaJWHCSg"
+ name="Component"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Component_3021"
+ hint="3021">
+ <iconEntry
+ xmi:id="_rWNxE3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Component.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw_HPzEeSnGJwaJWHCSg" name="Connectable Element Template Parameter" identifier="org.eclipse.papyrus.uml.diagram.clazz.ConnectableElementTemplateParameter_3034" hint="3034">
- <iconEntry xmi:id="_rWNw_XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/ConnectableElementTemplateParameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw_HPzEeSnGJwaJWHCSg"
+ name="Connectable Element Template Parameter"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ConnectableElementTemplateParameter_3034"
+ hint="3034">
+ <iconEntry
+ xmi:id="_rWNw_XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/ConnectableElementTemplateParameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.ConnectableElementTemplateParameter</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxj3PzEeSnGJwaJWHCSg" name="Constraint Constrained Element" identifier="org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014" hint="4014">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxj3PzEeSnGJwaJWHCSg"
+ name="Constraint Constrained Element"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"
+ hint="4014">
<specializedTypesID>org.eclipse.papyrus.uml.Constraint.ConstrainedElements</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWOX8HPzEeSnGJwaJWHCSg" name="Constraint Context" identifier="org.eclipse.papyrus.uml.diagram.clazz.ConstraintContext_8500" hint="8500">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWOX8HPzEeSnGJwaJWHCSg"
+ name="Constraint Context"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ConstraintContext_8500"
+ hint="8500">
<specializedTypesID>org.eclipse.papyrus.uml.Constraint.Context</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxZHPzEeSnGJwaJWHCSg" name="Constraint" identifier="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011" hint="2011">
- <iconEntry xmi:id="_rWNxZXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Constraint.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Constraint_As_UML::Package::packagedElement</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxKHPzEeSnGJwaJWHCSg" name="Constraint" identifier="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029" hint="3029">
- <iconEntry xmi:id="_rWNxKXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Constraint.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Constraint_As_UML::Package::packagedElement</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxlnPzEeSnGJwaJWHCSg" name="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023" identifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023" hint="4023">
- <specializedTypesID>org.eclipse.papyrus.uml.Namespace.OwnedMember</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxYnPzEeSnGJwaJWHCSg" name="Data Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_2010" hint="2010">
- <iconEntry xmi:id="_rWNxY3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxZHPzEeSnGJwaJWHCSg"
+ name="Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"
+ hint="2011">
+ <iconEntry
+ xmi:id="_rWNxZXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Constraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint_As_UML::Package::packagedElement</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxKHPzEeSnGJwaJWHCSg"
+ name="Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"
+ hint="3029">
+ <iconEntry
+ xmi:id="_rWNxKXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Constraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint_As_UML::Package::packagedElement</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxlnPzEeSnGJwaJWHCSg"
+ name="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
+ hint="4023">
+ <specializedTypesID>org.eclipse.papyrus.uml.Element.OwnedElement</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxYnPzEeSnGJwaJWHCSg"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_2010"
+ hint="2010">
+ <iconEntry
+ xmi:id="_rWNxY3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxJHPzEeSnGJwaJWHCSg" name="Data Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027" hint="3027">
- <iconEntry xmi:id="_rWNxJXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxJHPzEeSnGJwaJWHCSg"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"
+ hint="3027">
+ <iconEntry
+ xmi:id="_rWNxJXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxQHPzEeSnGJwaJWHCSg" name="Data Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043" hint="3043">
- <iconEntry xmi:id="_rWNxQXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxQHPzEeSnGJwaJWHCSg"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043"
+ hint="3043">
+ <iconEntry
+ xmi:id="_rWNxQXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxPHPzEeSnGJwaJWHCSg" name="Data Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044" hint="3044">
- <iconEntry xmi:id="_rWNxPXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxPHPzEeSnGJwaJWHCSg"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044"
+ hint="3044">
+ <iconEntry
+ xmi:id="_rWNxPXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxPnPzEeSnGJwaJWHCSg" name="Data Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045" hint="3045">
- <iconEntry xmi:id="_rWNxP3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxPnPzEeSnGJwaJWHCSg"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045"
+ hint="3045">
+ <iconEntry
+ xmi:id="_rWNxP3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxSHPzEeSnGJwaJWHCSg" name="Dependency Node" identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014" hint="2014">
- <iconEntry xmi:id="_rWNxSXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxSHPzEeSnGJwaJWHCSg"
+ name="Dependency Node"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"
+ hint="2014">
+ <iconEntry
+ xmi:id="_rWNxSXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxgnPzEeSnGJwaJWHCSg" name="Dependency Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008" hint="4008">
- <iconEntry xmi:id="_rWNxg3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxgnPzEeSnGJwaJWHCSg"
+ name="Dependency Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"
+ hint="4008">
+ <iconEntry
+ xmi:id="_rWNxg3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxhHPzEeSnGJwaJWHCSg" name="Dependency Branch Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018" hint="4018">
- <iconEntry xmi:id="_rWNxhXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxhHPzEeSnGJwaJWHCSg"
+ name="Dependency Branch Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"
+ hint="4018">
+ <iconEntry
+ xmi:id="_rWNxhXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxaHPzEeSnGJwaJWHCSg" name="Short Cut Diagram" identifier="org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016" hint="2016">
- <iconEntry xmi:id="_rWNxaXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Diagram.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxmHPzEeSnGJwaJWHCSg" name="Duration Observation Event" identifier="org.eclipse.papyrus.uml.diagram.clazz.DurationObservationEvent_4025" hint="4025">
- <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxaHPzEeSnGJwaJWHCSg"
+ name="Short Cut Diagram"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016"
+ hint="2016">
+ <iconEntry
+ xmi:id="_rWNxaXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Diagram.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.gmfdiag.common.Diagram</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxmHPzEeSnGJwaJWHCSg"
+ name="Duration Observation Event"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DurationObservationEvent_4025"
+ hint="4025">
+ <specializedTypesID>org.eclipse.papyrus.uml.DurationObservation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxanPzEeSnGJwaJWHCSg" name="Duration Observation" identifier="org.eclipse.papyrus.uml.diagram.clazz.DurationObservation_2095" hint="2095">
- <iconEntry xmi:id="_rWNxa3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/DurationObservation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxanPzEeSnGJwaJWHCSg"
+ name="Duration Observation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.DurationObservation_2095"
+ hint="2095">
+ <iconEntry
+ xmi:id="_rWNxa3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/DurationObservation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.DurationObservation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxhnPzEeSnGJwaJWHCSg" name="Element Import" identifier="org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009" hint="4009">
- <iconEntry xmi:id="_rWNxh3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/ElementImport.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxhnPzEeSnGJwaJWHCSg"
+ name="Element Import"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009"
+ hint="4009">
+ <iconEntry
+ xmi:id="_rWNxh3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/ElementImport.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.ElementImport</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxBHPzEeSnGJwaJWHCSg" name="Enumeration Literal" identifier="org.eclipse.papyrus.uml.diagram.clazz.EnumerationLiteral_3017" hint="3017">
- <iconEntry xmi:id="_rWNxBXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/EnumerationLiteral.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxBHPzEeSnGJwaJWHCSg"
+ name="Enumeration Literal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.EnumerationLiteral_3017"
+ hint="3017">
+ <iconEntry
+ xmi:id="_rWNxBXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/EnumerationLiteral.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.EnumerationLiteral</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxWHPzEeSnGJwaJWHCSg" name="Enumeration" identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006" hint="2006">
- <iconEntry xmi:id="_rWNxWXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Enumeration.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxWHPzEeSnGJwaJWHCSg"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006"
+ hint="2006">
+ <iconEntry
+ xmi:id="_rWNxWXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxGnPzEeSnGJwaJWHCSg" name="Enumeration" identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025" hint="3025">
- <iconEntry xmi:id="_rWNxG3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Enumeration.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxGnPzEeSnGJwaJWHCSg"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"
+ hint="3025">
+ <iconEntry
+ xmi:id="_rWNxG3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxMHPzEeSnGJwaJWHCSg" name="Enumeration" identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052" hint="3052">
- <iconEntry xmi:id="_rWNxMXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Enumeration.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxMHPzEeSnGJwaJWHCSg"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"
+ hint="3052">
+ <iconEntry
+ xmi:id="_rWNxMXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxMnPzEeSnGJwaJWHCSg" name="Enumeration" identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053" hint="3053">
- <iconEntry xmi:id="_rWNxM3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Enumeration.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxMnPzEeSnGJwaJWHCSg"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"
+ hint="3053">
+ <iconEntry
+ xmi:id="_rWNxM3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxNHPzEeSnGJwaJWHCSg" name="Enumeration" identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054" hint="3054">
- <iconEntry xmi:id="_rWNxNXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Enumeration.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxNHPzEeSnGJwaJWHCSg"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"
+ hint="3054">
+ <iconEntry
+ xmi:id="_rWNxNXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxknPzEeSnGJwaJWHCSg" name="Generalization Set" identifier="org.eclipse.papyrus.uml.diagram.clazz.GeneralizationSet_4020" hint="4020">
- <iconEntry xmi:id="_rWNxk3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/GeneralizationSet.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxknPzEeSnGJwaJWHCSg"
+ name="Generalization Set"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.GeneralizationSet_4020"
+ hint="4020">
+ <iconEntry
+ xmi:id="_rWNxk3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/GeneralizationSet.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.GeneralizationSet</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxdnPzEeSnGJwaJWHCSg" name="Generalization" identifier="org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002" hint="4002">
- <iconEntry xmi:id="_rWNxd3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxdnPzEeSnGJwaJWHCSg"
+ name="Generalization"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002"
+ hint="4002">
+ <iconEntry
+ xmi:id="_rWNxd3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Generalization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxmXPzEeSnGJwaJWHCSg" name="Information Flow" identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationFlow_4026" hint="4026">
- <iconEntry xmi:id="_rWNxmnPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InformationFlow.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxmXPzEeSnGJwaJWHCSg"
+ name="Information Flow"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationFlow_4026"
+ hint="4026">
+ <iconEntry
+ xmi:id="_rWNxmnPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InformationFlow.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InformationFlow</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxXHPzEeSnGJwaJWHCSg" name="Information Item" identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_2099" hint="2099">
- <iconEntry xmi:id="_rWNxXXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InformationItem.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxXHPzEeSnGJwaJWHCSg"
+ name="Information Item"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_2099"
+ hint="2099">
+ <iconEntry
+ xmi:id="_rWNxXXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InformationItem.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InformationItem</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxHnPzEeSnGJwaJWHCSg" name="Information Item" identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_3040" hint="3040">
- <iconEntry xmi:id="_rWNxH3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InformationItem.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxHnPzEeSnGJwaJWHCSg"
+ name="Information Item"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_3040"
+ hint="3040">
+ <iconEntry
+ xmi:id="_rWNxH3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InformationItem.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InformationItem</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxlHPzEeSnGJwaJWHCSg" name="Instance Specification Link" identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021" hint="4021">
- <iconEntry xmi:id="_rWNxlXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InstanceSpecification.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxlHPzEeSnGJwaJWHCSg"
+ name="Instance Specification Link"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021"
+ hint="4021">
+ <iconEntry
+ xmi:id="_rWNxlXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InstanceSpecification.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxTnPzEeSnGJwaJWHCSg" name="Instance Specification" identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001" hint="2001">
- <iconEntry xmi:id="_rWNxT3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InstanceSpecification.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxTnPzEeSnGJwaJWHCSg"
+ name="Instance Specification"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"
+ hint="2001">
+ <iconEntry
+ xmi:id="_rWNxT3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InstanceSpecification.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxEHPzEeSnGJwaJWHCSg" name="Instance Specification" identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020" hint="3020">
- <iconEntry xmi:id="_rWNxEXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InstanceSpecification.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxEHPzEeSnGJwaJWHCSg"
+ name="Instance Specification"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020"
+ hint="3020">
+ <iconEntry
+ xmi:id="_rWNxEXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InstanceSpecification.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxeHPzEeSnGJwaJWHCSg" name="Interface Realization" identifier="org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003" hint="4003">
- <iconEntry xmi:id="_rWNxeXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/InterfaceRealization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxeHPzEeSnGJwaJWHCSg"
+ name="Interface Realization"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003"
+ hint="4003">
+ <iconEntry
+ xmi:id="_rWNxeXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/InterfaceRealization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.InterfaceRealization</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxVHPzEeSnGJwaJWHCSg" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004" hint="2004">
- <iconEntry xmi:id="_rWNxVXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxVHPzEeSnGJwaJWHCSg"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"
+ hint="2004">
+ <iconEntry
+ xmi:id="_rWNxVXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxFnPzEeSnGJwaJWHCSg" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3023" hint="3023">
- <iconEntry xmi:id="_rWNxF3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxFnPzEeSnGJwaJWHCSg"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3023"
+ hint="3023">
+ <iconEntry
+ xmi:id="_rWNxF3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxKnPzEeSnGJwaJWHCSg" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3036" hint="3036">
- <iconEntry xmi:id="_rWNxK3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxKnPzEeSnGJwaJWHCSg"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3036"
+ hint="3036">
+ <iconEntry
+ xmi:id="_rWNxK3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxLHPzEeSnGJwaJWHCSg" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037" hint="3037">
- <iconEntry xmi:id="_rWNxLXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxLHPzEeSnGJwaJWHCSg"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"
+ hint="3037">
+ <iconEntry
+ xmi:id="_rWNxLXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxLnPzEeSnGJwaJWHCSg" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038" hint="3038">
- <iconEntry xmi:id="_rWNxL3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxLnPzEeSnGJwaJWHCSg"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"
+ hint="3038">
+ <iconEntry
+ xmi:id="_rWNxL3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxVnPzEeSnGJwaJWHCSg" name="Model" identifier="org.eclipse.papyrus.uml.diagram.clazz.Model_2005" hint="2005">
- <iconEntry xmi:id="_rWNxV3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Model.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxVnPzEeSnGJwaJWHCSg"
+ name="Model"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Model_2005"
+ hint="2005">
+ <iconEntry
+ xmi:id="_rWNxV3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Model.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Model</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxGHPzEeSnGJwaJWHCSg" name="Model" identifier="org.eclipse.papyrus.uml.diagram.clazz.Model_3024" hint="3024">
- <iconEntry xmi:id="_rWNxGXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Model.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxGHPzEeSnGJwaJWHCSg"
+ name="Model"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Model_3024"
+ hint="3024">
+ <iconEntry
+ xmi:id="_rWNxGXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Model.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Model</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxbnPzEeSnGJwaJWHCSg" name="Default Named Element" identifier="org.eclipse.papyrus.uml.diagram.clazz.NamedElement_2097" hint="2097">
- <iconEntry xmi:id="_rWNxb3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/NamedElement.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxbnPzEeSnGJwaJWHCSg"
+ name="Default Named Element"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.NamedElement_2097"
+ hint="2097">
+ <iconEntry
+ xmi:id="_rWNxb3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/NamedElement.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.NamedElement</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw_nPzEeSnGJwaJWHCSg" name="Operation Template Parameter" identifier="org.eclipse.papyrus.uml.diagram.clazz.OperationTemplateParameter_3035" hint="3035">
- <iconEntry xmi:id="_rWNw_3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/OperationTemplateParameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw_nPzEeSnGJwaJWHCSg"
+ name="Operation Template Parameter"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.OperationTemplateParameter_3035"
+ hint="3035">
+ <iconEntry
+ xmi:id="_rWNw_3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/OperationTemplateParameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.OperationTemplateParameter</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw9HPzEeSnGJwaJWHCSg" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003" hint="3003">
- <iconEntry xmi:id="_rWNw9XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw9HPzEeSnGJwaJWHCSg"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"
+ hint="3003">
+ <iconEntry
+ xmi:id="_rWNw9XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw9nPzEeSnGJwaJWHCSg" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3007" hint="3007">
- <iconEntry xmi:id="_rWNw93PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw9nPzEeSnGJwaJWHCSg"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3007"
+ hint="3007">
+ <iconEntry
+ xmi:id="_rWNw93PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw8nPzEeSnGJwaJWHCSg" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3013" hint="3013">
- <iconEntry xmi:id="_rWNw83PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw8nPzEeSnGJwaJWHCSg"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3013"
+ hint="3013">
+ <iconEntry
+ xmi:id="_rWNw83PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw-nPzEeSnGJwaJWHCSg" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3019" hint="3019">
- <iconEntry xmi:id="_rWNw-3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw-nPzEeSnGJwaJWHCSg"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3019"
+ hint="3019">
+ <iconEntry
+ xmi:id="_rWNw-3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw-HPzEeSnGJwaJWHCSg" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3042" hint="3042">
- <iconEntry xmi:id="_rWNw-XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw-HPzEeSnGJwaJWHCSg"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Operation_3042"
+ hint="3042">
+ <iconEntry
+ xmi:id="_rWNw-XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxiHPzEeSnGJwaJWHCSg" name="Package Import" identifier="org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010" hint="4010">
- <iconEntry xmi:id="_rWNxiXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PackageImport.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxiHPzEeSnGJwaJWHCSg"
+ name="Package Import"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"
+ hint="4010">
+ <iconEntry
+ xmi:id="_rWNxiXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PackageImport.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PackageImport</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxinPzEeSnGJwaJWHCSg" name="Package Merge" identifier="org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011" hint="4011">
- <iconEntry xmi:id="_rWNxi3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PackageMerge.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxinPzEeSnGJwaJWHCSg"
+ name="Package Merge"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011"
+ hint="4011">
+ <iconEntry
+ xmi:id="_rWNxi3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PackageMerge.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PackageMerge</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxWnPzEeSnGJwaJWHCSg" name="Package" identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_2007" hint="2007">
- <iconEntry xmi:id="_rWNxW3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxWnPzEeSnGJwaJWHCSg"
+ name="Package"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"
+ hint="2007">
+ <iconEntry
+ xmi:id="_rWNxW3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Package.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxHHPzEeSnGJwaJWHCSg" name="Package" identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_3009" hint="3009">
- <iconEntry xmi:id="_rWNxHXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxHHPzEeSnGJwaJWHCSg"
+ name="Package"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"
+ hint="3009">
+ <iconEntry
+ xmi:id="_rWNxHXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Package.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxYHPzEeSnGJwaJWHCSg" name="Primitive Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_2009" hint="2009">
- <iconEntry xmi:id="_rWNxYXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PrimitiveType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxYHPzEeSnGJwaJWHCSg"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_2009"
+ hint="2009">
+ <iconEntry
+ xmi:id="_rWNxYXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxInPzEeSnGJwaJWHCSg" name="Primitive Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026" hint="3026">
- <iconEntry xmi:id="_rWNxI3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PrimitiveType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxInPzEeSnGJwaJWHCSg"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"
+ hint="3026">
+ <iconEntry
+ xmi:id="_rWNxI3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxOHPzEeSnGJwaJWHCSg" name="Primitive Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046" hint="3046">
- <iconEntry xmi:id="_rWNxOXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PrimitiveType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxOHPzEeSnGJwaJWHCSg"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046"
+ hint="3046">
+ <iconEntry
+ xmi:id="_rWNxOXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxNnPzEeSnGJwaJWHCSg" name="Primitive Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047" hint="3047">
- <iconEntry xmi:id="_rWNxN3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PrimitiveType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxNnPzEeSnGJwaJWHCSg"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047"
+ hint="3047">
+ <iconEntry
+ xmi:id="_rWNxN3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxOnPzEeSnGJwaJWHCSg" name="Primitive Type" identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048" hint="3048">
- <iconEntry xmi:id="_rWNxO3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/PrimitiveType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxOnPzEeSnGJwaJWHCSg"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048"
+ hint="3048">
+ <iconEntry
+ xmi:id="_rWNxO3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxjHPzEeSnGJwaJWHCSg" name="Profile Application" identifier="org.eclipse.papyrus.uml.diagram.clazz.ProfileApplication_4012" hint="4012">
- <iconEntry xmi:id="_rWNxjXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/ProfileApplication.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxjHPzEeSnGJwaJWHCSg"
+ name="Profile Application"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.ProfileApplication_4012"
+ hint="4012">
+ <iconEntry
+ xmi:id="_rWNxjXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/ProfileApplication.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.ProfileApplication</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw4nPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3002" hint="3002">
- <iconEntry xmi:id="_rWNw43PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw4nPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"
+ hint="3002">
+ <iconEntry
+ xmi:id="_rWNw43PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw5HPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3005" hint="3005">
- <iconEntry xmi:id="_rWNw5XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw5HPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3005"
+ hint="3005">
+ <iconEntry
+ xmi:id="_rWNw5XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw5nPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3006" hint="3006">
- <iconEntry xmi:id="_rWNw53PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw5nPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3006"
+ hint="3006">
+ <iconEntry
+ xmi:id="_rWNw53PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw4HPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3012" hint="3012">
- <iconEntry xmi:id="_rWNw4XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw4HPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3012"
+ hint="3012">
+ <iconEntry
+ xmi:id="_rWNw4XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw6nPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3018" hint="3018">
- <iconEntry xmi:id="_rWNw63PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw6nPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3018"
+ hint="3018">
+ <iconEntry
+ xmi:id="_rWNw63PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNw6HPzEeSnGJwaJWHCSg" name="Property" identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3041" hint="3041">
- <iconEntry xmi:id="_rWNw6XPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNw6HPzEeSnGJwaJWHCSg"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Property_3041"
+ hint="3041">
+ <iconEntry
+ xmi:id="_rWNw6XPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxfHPzEeSnGJwaJWHCSg" name="Realization" identifier="org.eclipse.papyrus.uml.diagram.clazz.Realization_4005" hint="4005">
- <iconEntry xmi:id="_rWNxfXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Realization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxfHPzEeSnGJwaJWHCSg"
+ name="Realization"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Realization_4005"
+ hint="4005">
+ <iconEntry
+ xmi:id="_rWNxfXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Realization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Realization</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxBnPzEeSnGJwaJWHCSg" name="Reception" identifier="org.eclipse.papyrus.uml.diagram.clazz.Reception_3011" hint="3011">
- <iconEntry xmi:id="_rWNxB3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Reception.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxBnPzEeSnGJwaJWHCSg"
+ name="Reception"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Reception_3011"
+ hint="3011">
+ <iconEntry
+ xmi:id="_rWNxB3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Reception.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Reception</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxCHPzEeSnGJwaJWHCSg" name="Reception" identifier="org.eclipse.papyrus.uml.diagram.clazz.Reception_3039" hint="3039">
- <iconEntry xmi:id="_rWNxCXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Reception.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxCHPzEeSnGJwaJWHCSg"
+ name="Reception"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Reception_3039"
+ hint="3039">
+ <iconEntry
+ xmi:id="_rWNxCXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Reception.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Reception</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxDHPzEeSnGJwaJWHCSg" name="Redefinable Template Signature" identifier="org.eclipse.papyrus.uml.diagram.clazz.RedefinableTemplateSignature_3015" hint="3015">
- <iconEntry xmi:id="_rWNxDXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/RedefinableTemplateSignature.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxDHPzEeSnGJwaJWHCSg"
+ name="Redefinable Template Signature"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.RedefinableTemplateSignature_3015"
+ hint="3015">
+ <iconEntry
+ xmi:id="_rWNxDXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/RedefinableTemplateSignature.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.RedefinableTemplateSignature</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxUnPzEeSnGJwaJWHCSg" name="Signal" identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003" hint="2003">
- <iconEntry xmi:id="_rWNxU3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Signal.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxUnPzEeSnGJwaJWHCSg"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"
+ hint="2003">
+ <iconEntry
+ xmi:id="_rWNxU3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxFHPzEeSnGJwaJWHCSg" name="Signal" identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3022" hint="3022">
- <iconEntry xmi:id="_rWNxFXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Signal.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxFHPzEeSnGJwaJWHCSg"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3022"
+ hint="3022">
+ <iconEntry
+ xmi:id="_rWNxFXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxRnPzEeSnGJwaJWHCSg" name="Signal" identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049" hint="3049">
- <iconEntry xmi:id="_rWNxR3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Signal.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxRnPzEeSnGJwaJWHCSg"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049"
+ hint="3049">
+ <iconEntry
+ xmi:id="_rWNxR3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxQnPzEeSnGJwaJWHCSg" name="Signal" identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050" hint="3050">
- <iconEntry xmi:id="_rWNxQ3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Signal.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxQnPzEeSnGJwaJWHCSg"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050"
+ hint="3050">
+ <iconEntry
+ xmi:id="_rWNxQ3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxRHPzEeSnGJwaJWHCSg" name="Signal" identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051" hint="3051">
- <iconEntry xmi:id="_rWNxRXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Signal.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxRHPzEeSnGJwaJWHCSg"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051"
+ hint="3051">
+ <iconEntry
+ xmi:id="_rWNxRXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxCnPzEeSnGJwaJWHCSg" name="Slot" identifier="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030" hint="3030">
- <iconEntry xmi:id="_rWNxC3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Slot.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxCnPzEeSnGJwaJWHCSg"
+ name="Slot"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"
+ hint="3030">
+ <iconEntry
+ xmi:id="_rWNxC3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Slot.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Slot</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxenPzEeSnGJwaJWHCSg" name="Substitution" identifier="org.eclipse.papyrus.uml.diagram.clazz.Substitution_4004" hint="4004">
- <iconEntry xmi:id="_rWNxe3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Substitution.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxenPzEeSnGJwaJWHCSg"
+ name="Substitution"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Substitution_4004"
+ hint="4004">
+ <iconEntry
+ xmi:id="_rWNxe3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Substitution.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Substitution</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxkHPzEeSnGJwaJWHCSg" name="Template Binding" identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateBinding_4015" hint="4015">
- <iconEntry xmi:id="_rWNxkXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/TemplateBinding.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxkHPzEeSnGJwaJWHCSg"
+ name="Template Binding"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateBinding_4015"
+ hint="4015">
+ <iconEntry
+ xmi:id="_rWNxkXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/TemplateBinding.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.TemplateBinding</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxAnPzEeSnGJwaJWHCSg" name="Template Parameter" identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateParameter_3016" hint="3016">
- <iconEntry xmi:id="_rWNxA3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/TemplateParameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxAnPzEeSnGJwaJWHCSg"
+ name="Template Parameter"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateParameter_3016"
+ hint="3016">
+ <iconEntry
+ xmi:id="_rWNxA3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/TemplateParameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.TemplateParameter</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxDnPzEeSnGJwaJWHCSg" name="Template Signature" identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateSignature_3033" hint="3033">
- <iconEntry xmi:id="_rWNxD3PzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/TemplateSignature.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxDnPzEeSnGJwaJWHCSg"
+ name="Template Signature"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.TemplateSignature_3033"
+ hint="3033">
+ <iconEntry
+ xmi:id="_rWNxD3PzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/TemplateSignature.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.TemplateSignature</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxl3PzEeSnGJwaJWHCSg" name="Time Observation Event" identifier="org.eclipse.papyrus.uml.diagram.clazz.TimeObservationEvent_4024" hint="4024">
- <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxl3PzEeSnGJwaJWHCSg"
+ name="Time Observation Event"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.TimeObservationEvent_4024"
+ hint="4024">
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeObservation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxbHPzEeSnGJwaJWHCSg" name="Time Observation" identifier="org.eclipse.papyrus.uml.diagram.clazz.TimeObservation_2096" hint="2096">
- <iconEntry xmi:id="_rWNxbXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/TimeObservation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxbHPzEeSnGJwaJWHCSg"
+ name="Time Observation"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.TimeObservation_2096"
+ hint="2096">
+ <iconEntry
+ xmi:id="_rWNxbXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/TimeObservation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.TimeObservation</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_rWNxgHPzEeSnGJwaJWHCSg" name="Usage" identifier="org.eclipse.papyrus.uml.diagram.clazz.Usage_4007" hint="4007">
- <iconEntry xmi:id="_rWNxgXPzEeSnGJwaJWHCSg" iconPath="/icons/full/obj16/Usage.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_rWNxgHPzEeSnGJwaJWHCSg"
+ name="Usage"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Usage_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_rWNxgXPzEeSnGJwaJWHCSg"
+ iconPath="/icons/full/obj16/Usage.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Usage</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Blq1UK_vEeSWIf43-VACFg" name="Package" identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_1000" hint="PapyrusUMLClassDiagram">
- <iconEntry xmi:id="_Blq1Ua_vEeSWIf43-VACFg" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Blq1UK_vEeSWIf43-VACFg"
+ name="Package"
+ identifier="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"
+ hint="PapyrusUMLClassDiagram">
+ <iconEntry
+ xmi:id="_Blq1Ua_vEeSWIf43-VACFg"
+ iconPath="/icons/full/obj16/Package.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
</elementTypeConfigurations>
</elementtypesconfigurations:ElementTypeSetConfiguration>
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 5295015a6fc..d90cb5b0290 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
@@ -6013,7 +6013,7 @@
<behaviour
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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
@@ -6106,7 +6106,7 @@
<behaviour
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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
@@ -6336,7 +6336,7 @@
<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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
@@ -6487,7 +6487,7 @@
<behaviour
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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
@@ -6915,7 +6915,7 @@
<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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet">
<metaClass
@@ -7018,7 +7018,7 @@
<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"/>
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
<modelFacet
xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature
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 653636d902d..78a6111e29b 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
@@ -16,89 +16,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,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,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,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,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">
@@ -121,144 +121,137 @@
<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.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="false"?>
-
- <binding context="org.eclipse.papyrus.uml.diagram.clazz.TypeContext">
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- <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.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.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"
@@ -286,7 +279,7 @@
icon="icons/obj16/Diagram_Class.gif"
id="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand"
language="uml"
- label="Class Diagram">
+ label="UML Class Diagram">
</creationCommand>
<editorDiagram
actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
@@ -449,62 +442,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
@@ -514,749 +507,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">
@@ -1811,9 +1804,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>
<extension
point="org.eclipse.papyrus.infra.elementtypesconfigurations.elementTypeSetConfiguration">
<elementTypeSet
@@ -1828,9 +1821,9 @@
path="model/classdiagram-notation.elementtypesconfigurations">
</elementTypeSet>
</extension>
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- </extension>
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ </extension>
<extension
point="org.eclipse.papyrus.infra.gmfdiag.assistant.modelProviders">
<modelProvider
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionEditPart.java
index 4c616090aed..ad6740faa71 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionEditPart.java
@@ -20,8 +20,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy;
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.figure.edge.DashedEdgeFigure;
/**
@@ -48,7 +48,7 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeAbstractionLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkEditPart.java
index c9630cb57c0..a7d864b83fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkEditPart.java
@@ -19,10 +19,10 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.CustomContextLinkFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
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.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy;
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportEditPart.java
index fd0e6933ced..f462533bcc7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportEditPart.java
@@ -18,10 +18,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeElementImportLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
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.figure.edge.DashedEdgeFigure;
/**
@@ -48,7 +48,7 @@ public class ElementImportEditPart extends UMLConnectionNodeEditPart implements
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeElementImportLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowEditPart.java
index f03b59e13f7..c1b7793e04c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowEditPart.java
@@ -18,9 +18,9 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationFlowFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeInformationFlowLabelDisplayEditPolicy;
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;
/**
* @generated
@@ -46,7 +46,7 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeInformationFlowLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageMergeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageMergeEditPart.java
index a1133b5bf8d..730679926eb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageMergeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageMergeEditPart.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
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.AppliedStereotypePackageMergeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
/**
@@ -48,7 +48,7 @@ public class PackageMergeEditPart extends UMLConnectionNodeEditPart implements I
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypePackageMergeLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageEditPart.java
index 6228ba52428..200fbe0bf14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageEditPart.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
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.AppliedStereotypeUsageLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
/**
@@ -48,7 +48,7 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeUsageLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/messages.properties
index cf04fa5b87b..0d5288bf8f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/messages.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/messages.properties
@@ -44,6 +44,9 @@ AppliedStereotypeLabel_PackageImportAccessTag=access
AppliedStereotypeLabel_AbstractionTag=abstraction
AppliedStereotypeLabel_PackageMergeTag=merge
+############# Label Customization ###################
+ICustomAppearance_PIN_DISP_TYPE=Pin Type
+
############# Palette Customisation #################
PapyrusPaletteCustomizerDialog_AddButtonTooltip=Add the selection to the palette
PapyrusPaletteCustomizerDialog_RemoveButtonTooltip=Remove the selection from the palette
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Messages.java
index b31c97e5235..cae8c6b57fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Messages.java
@@ -88,6 +88,8 @@ public class Messages extends NLS {
public static String RotateAction_rotate_command;
+ public static String ICustomAppearance_PIN_DISP_TYPE;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java
index d7cf444095a..1d016313226 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.java
@@ -11,12 +11,11 @@
* Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
+package org.eclipse.papyrus.uml.diagram.common.editpolicies;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
/**
@@ -24,11 +23,13 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigu
*/
public class CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
+ public static final String APPLIED_STEREOTYPE_LABEL = "context"; //$NON-NLS-1$
+
/**
* Creates the EditPolicy, with the correct tag.
*/
public CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy() {
- super("context"); //$NON-NLS-1$
+ super(APPLIED_STEREOTYPE_LABEL); //$NON-NLS-1$
}
@Override
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
index 7de6f25b5f0..450abb48d6e 100644
--- 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
@@ -12,7 +12,6 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.editpolicies;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
@@ -24,17 +23,11 @@ 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.
@@ -77,45 +70,6 @@ public class MaskManagedFloatingLabelEditPolicy extends AbstractMaskManagedEditP
*/
@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;
}
@@ -248,7 +202,7 @@ public class MaskManagedFloatingLabelEditPolicy extends AbstractMaskManagedEditP
getDiagramEventBroker().removeNotificationListener(((MultiplicityElement) umlElement).getLowerValue(), this);
}
}
-
+
/**
* @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy#getCurrentDisplayValue()
*
@@ -256,7 +210,7 @@ public class MaskManagedFloatingLabelEditPolicy extends AbstractMaskManagedEditP
*/
@Override
public Collection<String> getCurrentDisplayValue() {
- if (getView() == null){
+ if (getView() == null) {
return Collections.emptySet();
}
return super.getCurrentDisplayValue();
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 632e08bd68d..f89a00b1015 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
@@ -100,16 +100,12 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
minimumWith = wl.getPreferredSize().width + 2;
}
}
-
}
if (!visibleCompartments.isEmpty()) {
for (Object o : container.getChildren()) {
- // 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);
- }
+ IFigure child = (IFigure) o;
+ minimumHeight += child.getPreferredSize().height;
+ minimumWith = Math.max(minimumWith, child.getPreferredSize().width);
}
} else {
for (IFigure child : visibleOthers) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/ActivityParameterNodeLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/ActivityParameterNodeLabelHelper.java
new file mode 100644
index 00000000000..26520778547
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/ActivityParameterNodeLabelHelper.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.helper;
+
+import java.util.Collection;
+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.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.State;
+
+
+public class ActivityParameterNodeLabelHelper extends StereotypedElementLabelHelper {
+
+ /**
+ * String for separate masked label part
+ */
+ private static final String SEPARATOR = ": ";
+
+ private static final String STATE_SEPARATOR = ", ";
+
+ private static final String START_STATE_SEQUENCE = "[";
+
+ private static final String END_STATE_SEQUENCE = "]";
+
+ private static ActivityParameterNodeLabelHelper labelHelper;
+
+ /**
+ * Returns the singleton instance of this class
+ *
+ * @return the singleton instance.
+ */
+ public static ActivityParameterNodeLabelHelper getInstance() {
+ if (labelHelper == null) {
+ labelHelper = new ActivityParameterNodeLabelHelper();
+ }
+ return labelHelper;
+ }
+
+ /** Map for masks */
+ protected final Map<String, String> masks = new HashMap<String, String>();
+
+ /**
+ * Creates a new {@link ActivityParameterNode} label helper.
+ */
+ protected ActivityParameterNodeLabelHelper() {
+ // initialize the map
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_NAME, "Parameter Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_STATE, "States");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String elementLabel(GraphicalEditPart editPart) {
+ Collection<String> displayValue = ICustomAppearance.DEFAULT_UML_ACTIVITYPARAMETERNODE;
+
+ IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy) editPart.getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (policy != null) {
+ displayValue = policy.getCurrentDisplayValue();
+ }
+ return parse(displayValue, getUMLElement(editPart));
+ }
+
+ public Map<String, String> getMasks() {
+ return masks;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ActivityParameterNode getUMLElement(GraphicalEditPart editPart) {
+ return (ActivityParameterNode) ((View) editPart.getModel()).getElement();
+ }
+
+ protected String parse(Collection<String> values, ActivityParameterNode node) {
+ StringBuilder result = new StringBuilder();
+ if (node == null) {
+ return "";
+ }
+ // building label value take from
+ // org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser#getPrintString
+ if (values.contains(ICustomAppearance.DISP_NAME)) {
+ appendName(result, node);
+ }
+ if (values.contains(ICustomAppearance.DISP_PARAMETER_NAME) || result.length() == 0) {
+ appendName(result, node.getParameter());
+ }
+ if (values.contains(ICustomAppearance.DISP_TYPE)) {
+ appendName(result, node.getType());
+ }
+ if (values.contains(ICustomAppearance.DISP_STATE)) {
+ StringBuffer stateLabel = new StringBuffer();
+ for (State state : node.getInStates()) {
+ String stateName = state.getName();
+ if (stateName != null && stateName.length() > 0) {
+ if (stateLabel.length() > 0) {
+ stateLabel.append(STATE_SEPARATOR);
+ }
+ stateLabel.append(stateName);
+ }
+ }
+ if (stateLabel.length() > 0) {
+ if (result.length() > 0) {
+ result.append(System.getProperty("line.separator"));
+ }
+ result.append(START_STATE_SEQUENCE).append(stateLabel).append(END_STATE_SEQUENCE);
+ }
+ }
+ return result.toString();
+ }
+
+ private void appendName(StringBuilder builder, NamedElement element) {
+ if (element == null) {
+ return;
+ }
+ String name = element.getName();
+ if (name != null && name.length() > 0) {
+ if (builder.length() > 0) {
+ builder.append(SEPARATOR);
+ }
+ builder.append(name);
+ }
+ }
+}
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
index 05014b9ec21..2f0fdcc0bc4 100644
--- 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
@@ -21,38 +21,38 @@ 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.papyrus.uml.tools.utils.TypedElementUtil;
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 Constant SLASH. */
+ private static final String SLASH = "/";//$NON-NLS-1$
+
+ /** The Constant DOUBLE_DOT. */
+ private static final String DOUBLE_DOT = ": ";//$NON-NLS-1$
+
+ /** The Constant ONE_SPACE. */
+ private static final String ONE_SPACE = " ";//$NON-NLS-1$
+
+ /** The Constant EMPTY. */
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+ /** The Constant STEREOTYPE. */
+ private static final String STEREOTYPE = "stereotype"; //$NON-NLS-1$
+
/** The label helper. */
private static FloatingLabelHelper labelHelper;
@@ -105,45 +105,17 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
/**
* 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");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
/** 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");
}
/**
@@ -184,12 +156,18 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
*/
protected String parseString(GraphicalEditPart editPart, Collection<String> displayValue) {
NamedElement namedElement = getUMLElement(editPart);
+ StringBuilder buffer = new StringBuilder();
+
+ if (displayValue.contains(STEREOTYPE)) {
+ // computes the label for the stereotype (horizontal presentation)
+ buffer.append(stereotypesToDisplay((GraphicalEditPart) editPart.getParent()));
+ }
if (namedElement != null) {
- return getCustomLabel(namedElement, displayValue);
+ buffer.append(getCustomLabel(namedElement, displayValue));
}
- return "";
+ return buffer.toString();
}
@@ -217,6 +195,15 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
}
/**
+ * Computes the label to be displayed for the floating label
+ */
+ @Override
+ protected String labelToDisplay(GraphicalEditPart editPart) {
+ // computes the string label to be displayed
+ return elementLabel(editPart);
+ }
+
+ /**
* return the custom label of the property, given UML2 specification and a custom style.
*
* @param namedElement
@@ -225,52 +212,21 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
* the mask values
* @return the string corresponding to the label of the property
*/
- public static String getCustomLabel(NamedElement namedElement, Collection<String> maskValues) {
+ public 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();
+ StringBuilder buffer = new StringBuilder();
// visibility
if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
- buffer.append(" ");
+ buffer.append(ONE_SPACE);
buffer.append(NamedElementUtil.getVisibilityAsSign(namedElement));
}
@@ -278,25 +234,22 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
if (namedElement instanceof Association) {
if (maskValues.contains(ICustomAppearance.DISP_DERIVE)) {
if (((Association) namedElement).isDerived()) {
- buffer.append("/");
+ buffer.append(SLASH);
}
}
}
// name
if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
- buffer.append(" ");
- buffer.append(namedElement.getName());
+ buffer.append(ONE_SPACE);
+ final String name = namedElement.getName();
+ buffer.append(name != null ? name : EMPTY);
}
// 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);
- }
+ if (maskValues.contains(ICustomAppearance.DISP_RT_TYPE) || maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ buffer.append(DOUBLE_DOT);
+ buffer.append(TypedElementUtil.getTypeAsString((TypedElement) namedElement));
}
}
@@ -309,17 +262,6 @@ public class FloatingLabelHelper extends StereotypedElementLabelHelper {
}
}
- // 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/parser/stereotype/AppliedStereotypeParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/stereotype/AppliedStereotypeParser.java
index 7cc25dac0a7..28ac8c419ae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/stereotype/AppliedStereotypeParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/stereotype/AppliedStereotypeParser.java
@@ -34,6 +34,16 @@ public class AppliedStereotypeParser implements ISemanticParser {
private static final MessageFormat APPLIED_PROFILE = new MessageFormat("\u00AB{0}\u00BB"); //$NON-NLS-1$
+ private final String myDefaultPrintString;
+
+ public AppliedStereotypeParser() {
+ this(null);
+ }
+
+ public AppliedStereotypeParser(String defaultPrintString) {
+ myDefaultPrintString = defaultPrintString;
+ }
+
@Override
public boolean areSemanticElementsAffected(EObject listener, Object notification) {
if (notification instanceof Notification) {
@@ -94,7 +104,8 @@ public class AppliedStereotypeParser implements ISemanticParser {
@Override
public String getPrintString(IAdaptable element, int flags) {
String editString = getEditString(element, flags);
- return editString == null || editString.length() == 0 ? editString : APPLIED_PROFILE.format(new Object[] { editString });
+ editString = editString == null || editString.isEmpty() ? myDefaultPrintString : editString;
+ return editString == null || editString.isEmpty() ? "" : APPLIED_PROFILE.format(new Object[] { editString });
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
index 71623baf2e8..0b02d57bbfe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Saadia Dhouib saadia.dhouib@cea.fr - Initial API and Implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.commands;
@@ -17,6 +17,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPartViewer;
@@ -26,8 +27,12 @@ import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
+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.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+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.part.UMLVisualIDRegistry;
@@ -96,14 +101,32 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
CreateConnectionViewRequest createRequest = new CreateConnectionViewRequest(viewDescriptor);
createConnectionCmd = CreateConnectionViewRequest.getCreateCommand(createRequest, sourceEditPart, targetEditPart);
- if (createConnectionCmd.canExecute()) {
- createConnectionCmd.execute();
+ // Double-check that another drop command didn't already create the edge
+ View messagePath = findCommunicationPath(sourceEditPart, targetEditPart);
+ if (messagePath != null) {
+ // Pretend that we created it
+ createRequest.getConnectionViewDescriptor().setView(messagePath);
+
+ // And create a label, instead
+ if (labelElement != null) {
+ IAdaptable semanticAdapter = new SemanticAdapter(labelElement, null);
+ // Location where the label will be dropped, as in the drop edit policy
+ Point loc = new Point(1, -23);
+ ICommand cmd = new CustomMessageViewCreateCommand(getEditingDomain(), viewer, preferencesHint, loc, semanticAdapter, messagePath);
+ if (cmd.canExecute()) {
+ cmd.execute(null, null);
+ }
+ }
+ } else {
+ if (createConnectionCmd.canExecute()) {
+ createConnectionCmd.execute();
+ }
}
if (labelElement != null) {
/*
* Code Commented to no more set the the semantic element of the connector
- *
+ *
* //Set element of the connector to Interaction !! This has to be changed in the next release, because it is incoherent !!!
* //If setElement(null) , I can not do the reorient anymore !!
* // View temp = (View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class));
@@ -119,20 +142,22 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
* // }
*/
+ messagePath = (View) createRequest.getConnectionViewDescriptor().getAdapter(View.class);
+ if (messagePath == null) {
+ viewer = null;// for garbage collection
+ return CommandResult.newErrorCommandResult("Failed to obtain or create communication-path link.");
+ }
+
// set element of the label of the connector to element
- if (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().size() > 1) {
-
- for (int i = 0; i < ((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().size(); i++) {
- // ---------------------------------------------------------
- // help to debug
- // System.err.println("Child of connector view :" + (((View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i)));
- // System.err.println("VisualID of Child of connector view :" + UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
- // System.err.println("VisualID of MessageNameEditPart :" + ((View)(((View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).getType());
- // ---------------------------------------------------------
- if (((View) (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).getType().equals(UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID))) {// this is the label that coresponds to the
- // message
- ((View) (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).setElement(labelElement);
- // System.err.println("VisualID of MessageNameEditPart == VisualID of Child of connector view ");
+ if (messagePath.getChildren().size() > 1) {
+
+ for (int i = 0; i < messagePath.getChildren().size(); i++) {
+ View label = (View) (messagePath.getChildren().get(i));
+ if (UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID).equals(label.getType())) {
+ // This is a message label. Is it the one we need to set?
+ if (!label.eIsSet(NotationPackage.Literals.VIEW__ELEMENT) || (label.getElement() == null)) {
+ label.setElement(labelElement);
+ }
}
}
}
@@ -140,6 +165,36 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
}
viewer = null;// for garbage collection
- return CommandResult.newOKCommandResult();
+ return CommandResult.newOKCommandResult(createRequest.getConnectionViewDescriptor());
+ }
+
+ @SuppressWarnings("unchecked")
+ protected View findCommunicationPath(IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) {
+ View result = null;
+
+ View sourceView = sourceEditPart.getNotationView();
+ View targetView = targetEditPart.getNotationView();
+
+ if ((sourceView != null) && (targetView != null)) {
+ for (Edge next : (Iterable<? extends Edge>) sourceView.getSourceEdges()) {
+ if ((UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID)).equals(next.getType())
+ && (next.getTarget() == targetView)) {
+ result = next;
+ break;
+ }
+ }
+ if (result == null) {
+ // Try the reverse orientation
+ for (Edge next : (Iterable<? extends Edge>) sourceView.getTargetEdges()) {
+ if ((UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID)).equals(next.getType())
+ && (next.getSource() == targetView)) {
+ result = next;
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
index fc5b78c8dd6..6a9c48d4f67 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.commands;
@@ -24,7 +24,6 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
@@ -38,7 +37,7 @@ import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
@@ -74,7 +73,7 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
private EditPartViewer viewer;
/** The existing link. */
- private ConnectionEditPart existingLink;
+ private View existingLink;
/**
* Instantiates a new custom message view create command.
@@ -94,7 +93,7 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
* @param link
* the link
*/
- public CustomMessageViewCreateCommand(TransactionalEditingDomain domain, EditPartViewer viewer, PreferencesHint preferencesHint, Point point, IAdaptable semanticAdapter, ConnectionEditPart link) {
+ public CustomMessageViewCreateCommand(TransactionalEditingDomain domain, EditPartViewer viewer, PreferencesHint preferencesHint, Point point, IAdaptable semanticAdapter, View link) {
super(domain, "MessageClassViewCreateCommand", null); //$NON-NLS-1$
// this.containerView = container;
this.viewer = viewer;
@@ -114,13 +113,10 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
* @return
* @throws ExecutionException
*/
- @SuppressWarnings("static-access")
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // IFigure linkEditPart = (IFigure)existingLink.getFigure();
- View linkView = ((IGraphicalEditPart) existingLink).getNotationView();
// Connector linkConnector = linkView.get
- CustomMessageViewCreateCommand.node = customCreateLabel(((EObject) semanticApdater.getAdapter(EObject.class)), linkView, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
+ CustomMessageViewCreateCommand.node = customCreateLabel(((EObject) semanticApdater.getAdapter(EObject.class)), existingLink, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
// put to the good position
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
// notationLocation.setX(location.x);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
index dec8cd5f19f..e310326380b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
+ * Copyright (c) 2010, 2015 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,9 +7,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
-
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
* Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr
+ * Christian W. Damus - bug 462958
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies;
@@ -46,8 +46,8 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewServiceUtil;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CommunicationDeferredCreateConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessageViewCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.custom.helper.CommunicationLinkMappingHelper;
@@ -90,7 +90,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the UML element type.
*
* @param elementID
- * the element id
+ * the element id
* @return the UML element type {@inheritDoc}
*/
@Override
@@ -102,9 +102,9 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the node visual id.
*
* @param containerView
- * the container view
+ * the container view
* @param domainElement
- * the domain element
+ * the domain element
* @return the node visual id {@inheritDoc}
*/
@Override
@@ -116,7 +116,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the link with class visual id.
*
* @param domainElement
- * the domain element
+ * the domain element
* @return the link with class visual id {@inheritDoc}
*/
@Override
@@ -125,8 +125,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
/**
- * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy#getSpecificDropCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest,
- * org.eclipse.uml2.uml.Element, int, int)
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy#getSpecificDropCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest, org.eclipse.uml2.uml.Element, int, int)
*
* @param dropRequest
* @param semanticElement
@@ -136,22 +135,22 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
*/
@Override
protected Command getSpecificDropCommand(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID, int linkVISUALID) {
- switch(linkVISUALID) {
+ switch (linkVISUALID) {
case MessageEditPart.VISUAL_ID:
return dropMessage(dropRequest, semanticElement, linkVISUALID);
default:
// Switch test over nodeVISUALID
- switch(nodeVISUALID) {
+ switch (nodeVISUALID) {
case LifelineEditPartCN.VISUAL_ID:
return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
- // case CommentEditPartCN.VISUAL_ID:
- // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
- // case ConstraintEditPartCN.VISUAL_ID:
- // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
+ // case CommentEditPartCN.VISUAL_ID:
+ // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
+ // case ConstraintEditPartCN.VISUAL_ID:
+ // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
case TimeObservationEditPartCN.VISUAL_ID:
- return dropTimeObservation(dropRequest, (TimeObservation)semanticElement, nodeVISUALID);
+ return dropTimeObservation(dropRequest, (TimeObservation) semanticElement, nodeVISUALID);
case DurationObservationEditPartCN.VISUAL_ID:
- return dropDurationObservation(dropRequest, (DurationObservation)semanticElement, nodeVISUALID);
+ return dropDurationObservation(dropRequest, (DurationObservation) semanticElement, nodeVISUALID);
case CommentEditPartCN.VISUAL_ID:
return dropComment(dropRequest, semanticElement, nodeVISUALID);
case ConstraintEditPartCN.VISUAL_ID:
@@ -166,86 +165,88 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Returns the command to drop the Comment + the link to attach it to its annotated elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropComment(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof Interaction)) {
+ if (!(graphicalParentObject instanceof Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- return getDropCommentCommand((Comment)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Comment_8005, (IHintedType)UMLElementTypes.CommentAnnotatedElement_8010);
+ return getDropCommentCommand((Comment) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Comment_8005,
+ (IHintedType) UMLElementTypes.CommentAnnotatedElement_8010);
}
/**
* Returns the command to drop the Constraint + the link to attach it to its contrainted elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropConstraint(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof Interaction)) {
+ if (!(graphicalParentObject instanceof Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- return getDropConstraintCommand((Constraint)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Constraint_8004, (IHintedType)UMLElementTypes.ConstraintConstrainedElement_8011);
+ return getDropConstraintCommand((Constraint) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Constraint_8004,
+ (IHintedType) UMLElementTypes.ConstraintConstrainedElement_8011);
}
/**
* Returns the drop command for TimeObservation nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropTimeObservation(DropObjectsRequest dropRequest, TimeObservation droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
TimeObservationHelper timeObservationHelper = new TimeObservationHelper(getEditingDomain());
- return timeObservationHelper.dropTimeObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return timeObservationHelper.dropTimeObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
* Returns the drop command for ShortCutDiagram nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropShortCutDiagram(DropObjectsRequest dropRequest, Diagram droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
DiagramShortCutHelper diagramShortCutHelper = new DiagramShortCutHelper(getEditingDomain());
- return diagramShortCutHelper.dropDiagramShortCut(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return diagramShortCutHelper.dropDiagramShortCut(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
@@ -256,18 +257,18 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* </pre>
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticElement
- * the semantic element
+ * the semantic element
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
*
* @return the drop command
*/
protected Command dropChildNode(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction) {
+ if (graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction) {
return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropRequest.getLocation(), semanticElement));
}
return UnexecutableCommand.INSTANCE;
@@ -277,59 +278,59 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Returns the drop command for DurationObservation nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropDurationObservation(DropObjectsRequest dropRequest, DurationObservation droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
DurationObservationHelper durationObservationHelper = new DurationObservationHelper(getEditingDomain());
- return durationObservationHelper.dropDurationObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return durationObservationHelper.dropDurationObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
* Returns the drop command for Message links.
*
* @param dropRequest
- * the drop request
+ * the drop request
*
* @param semanticLink
- * the link to drop
+ * the link to drop
* @param linkVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*
*/
public Command dropMessage(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- if(semanticLink instanceof Message) {//if the drop request concerns a UML message
- //1. verify if source and target of the message are already connected
+ if (semanticLink instanceof Message) {// if the drop request concerns a UML message
+ // 1. verify if source and target of the message are already connected
Collection<?> sources = CommunicationLinkMappingHelper.getInstance().getSource(semanticLink);
Collection<?> targets = CommunicationLinkMappingHelper.getInstance().getTarget(semanticLink);
- if(!sources.isEmpty() && !targets.isEmpty()) {
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- if((source instanceof Lifeline) && (target instanceof Lifeline)) {
- Set<Message> messages = CommunicationUtil.verifyUMLLifelinesConnected((Lifeline)source, (Lifeline)target);
- if(!(messages == null) && (messages.size() >= 1)) {//the UML lifelines are already connected by one or more than one more message
- //1. search for the edit parts of the messages
+ if (!sources.isEmpty() && !targets.isEmpty()) {
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
+ if ((source instanceof Lifeline) && (target instanceof Lifeline)) {
+ Set<Message> messages = CommunicationUtil.verifyUMLLifelinesConnected((Lifeline) source, (Lifeline) target);
+ if (!(messages == null) && (messages.size() >= 1)) {// the UML lifelines are already connected by one or more than one more message
+ // 1. search for the edit parts of the messages
List<EditPart> messagesEP = null;
- for(Message current : messages) {
+ for (Message current : messages) {
EditPart messageEP = lookForEditPart(current);
- if(!(messageEP == null)) {
- if(messagesEP == null) {
+ if (!(messageEP == null)) {
+ if (messagesEP == null) {
messagesEP = new ArrayList<EditPart>();
messagesEP.add(messageEP);
} else {
@@ -337,19 +338,20 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
}
}
- //System.err.println("Messages edit parts on the link :" + messagesEP);
- //System.err.println("Semantic messages on the link :" + messages);
- //2. Create the drop commands
- if(messagesEP == null) {//There is no graphical connection between the two lifelines (in this diagram)
- //create a dropMessageAsConnector Command
+ // System.err.println("Messages edit parts on the link :" + messagesEP);
+ // System.err.println("Semantic messages on the link :" + messages);
+ // 2. Create the drop commands
+ if (messagesEP == null) {// There is no graphical connection between the two lifelines (in this diagram)
+ // create a dropMessageAsConnector Command
return new ICommandProxy(dropMessageAsConnector(new CompositeCommand("drop Message"), source, target, linkVISUALID, dropRequest.getLocation(), semanticLink)); //$NON-NLS-1$
- } else {//add the message as a label of the graphical connector
- ConnectionEditPart conEP = (ConnectionEditPart)messagesEP.get(0).getParent();
+ } else {// add the message as a label of the graphical connector
+ ConnectionEditPart conEP = (ConnectionEditPart) messagesEP.get(0).getParent();
IAdaptable linkAdapter = new SemanticAdapter(semanticLink, null);
- //location where the label will be dropped
+ // location where the label will be dropped
Point loc = new Point(1, -23);
- //reuse of the CustomMessageViewCreateCommand
- return new ICommandProxy(new CustomMessageViewCreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), conEP.getViewer(), ((IGraphicalEditPart)conEP).getDiagramPreferencesHint(), loc, linkAdapter, conEP));
+ // reuse of the CustomMessageViewCreateCommand
+ return new ICommandProxy(
+ new CustomMessageViewCreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), conEP.getViewer(), ((IGraphicalEditPart) conEP).getDiagramPreferencesHint(), loc, linkAdapter, conEP.getNotationView()));
}
}
}
@@ -363,53 +365,55 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* If the source and the target views do not exist, these views will be created.
*
* @param cc
- * the composite command that will contain the set of command to create the message
+ * the composite command that will contain the set of command to create the message
* @param source
- * the source the element source of the link
+ * the source the element source of the link
* @param target
- * the target the element target of the link
+ * the target the element target of the link
* @param linkVISUALID
- * the link VISUALID used to create the view
+ * the link VISUALID used to create the view
* @param location
- * the location the location where the view will be be created
+ * the location the location where the view will be be created
* @param semanticLink
- * the semantic link that will be attached to the view
+ * the semantic link that will be attached to the view
*
* @return the composite command
*/
public CompositeCommand dropMessageAsConnector(CompositeCommand cc, Element source, Element target, int linkVISUALID, Point location, Element semanticLink) {
// look for editpart
- GraphicalEditPart sourceEditPart = (GraphicalEditPart)lookForEditPart(source);
- GraphicalEditPart targetEditPart = (GraphicalEditPart)lookForEditPart(target);
+ GraphicalEditPart sourceEditPart = (GraphicalEditPart) lookForEditPart(source);
+ GraphicalEditPart targetEditPart = (GraphicalEditPart) lookForEditPart(target);
// descriptor of the link
- CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), getDiagramPreferencesHint());
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(),
+ getDiagramPreferencesHint());
IAdaptable sourceAdapter = null;
IAdaptable targetAdapter = null;
- if(sourceEditPart == null) {
+ if (sourceEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- sourceAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ sourceAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
sourceAdapter = new SemanticAdapter(null, sourceEditPart.getModel());
}
- if(targetEditPart == null) {
+ if (targetEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- targetAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ targetAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
targetAdapter = new SemanticAdapter(null, targetEditPart.getModel());
}
- CommunicationDeferredCreateConnectionViewCommand aLinkCommand = new CommunicationDeferredCreateConnectionViewCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null, semanticLink);
+ CommunicationDeferredCreateConnectionViewCommand aLinkCommand = new CommunicationDeferredCreateConnectionViewCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter,
+ targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null, semanticLink);
cc.compose(aLinkCommand);
return cc;
}
@@ -448,55 +452,55 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
// the command for that.
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
Iterator<?> iter = dropRequest.getObjects().iterator();
- if(dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
+ if (dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
return getDropFileCommand(dropRequest);
}
Point location = dropRequest.getLocation().getCopy();
- ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(location);
- ((GraphicalEditPart)getHost()).getContentPane().translateFromParent(location);
- location.translate(((GraphicalEditPart)getHost()).getContentPane().getClientArea().getLocation().getNegated());
- while(iter.hasNext()) {
- EObject droppedObject = (EObject)iter.next();
- int nodeVISUALID = getNodeVisualID(((IGraphicalEditPart)getHost()).getNotationView(), droppedObject);
+ ((GraphicalEditPart) getHost()).getContentPane().translateToRelative(location);
+ ((GraphicalEditPart) getHost()).getContentPane().translateFromParent(location);
+ location.translate(((GraphicalEditPart) getHost()).getContentPane().getClientArea().getLocation().getNegated());
+ while (iter.hasNext()) {
+ EObject droppedObject = (EObject) iter.next();
+ int nodeVISUALID = getNodeVisualID(((IGraphicalEditPart) getHost()).getNotationView(), droppedObject);
int linkVISUALID = getLinkWithClassVisualID(droppedObject);
- if(getDroppableElementVisualId().contains(nodeVISUALID) || getDroppableElementVisualId().contains(linkVISUALID)) {
+ if (getDroppableElementVisualId().contains(nodeVISUALID) || getDroppableElementVisualId().contains(linkVISUALID)) {
dropRequest.setLocation(location);
// TODO: add to composite command ?
- if(nodeVISUALID == -1 && linkVISUALID == -1 && (droppedObject instanceof Diagram)) {//if the dropped element is the diagram short cut
- cc.add(new CommandProxy(dropShortCutDiagram(dropRequest, (Diagram)droppedObject, nodeVISUALID)));
+ if (nodeVISUALID == -1 && linkVISUALID == -1 && (droppedObject instanceof Diagram)) {// if the dropped element is the diagram short cut
+ cc.add(new CommandProxy(dropShortCutDiagram(dropRequest, (Diagram) droppedObject, nodeVISUALID)));
} else {
- cc.add(new CommandProxy(getSpecificDropCommand(dropRequest, (Element)droppedObject, nodeVISUALID, linkVISUALID)));
+ cc.add(new CommandProxy(getSpecificDropCommand(dropRequest, (Element) droppedObject, nodeVISUALID, linkVISUALID)));
}
continue;
}
- if(linkVISUALID == -1 && nodeVISUALID != -1) {
+ if (linkVISUALID == -1 && nodeVISUALID != -1) {
// The element to drop is a node
// Retrieve it's expected graphical parent
- EObject graphicalParent = ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ EObject graphicalParent = ((GraphicalEditPart) getHost()).resolveSemanticElement();
// Restrict the default node creation to the following cases:
// . Take the containment relationship into consideration
// . Release the constraint when GraphicalParent is a Package (Canvas for most
// diagrams)
- if(graphicalParent instanceof Package) {
+ if (graphicalParent instanceof Package) {
cc.add(getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject));
} else {
- if((graphicalParent instanceof Element) && ((Element)graphicalParent).getOwnedElements().contains(droppedObject)) {
+ if ((graphicalParent instanceof Element) && ((Element) graphicalParent).getOwnedElements().contains(droppedObject)) {
cc.add(getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject));
} else {
return UnexecutableCommand.INSTANCE;
}
}
} else {
- if(linkVISUALID != -1) {
- Collection<?> sources = linkmappingHelper.getSource((Element)droppedObject);
- Collection<?> targets = linkmappingHelper.getTarget((Element)droppedObject);
- if(sources.size() == 0 || targets.size() == 0) {
+ if (linkVISUALID != -1) {
+ Collection<?> sources = linkmappingHelper.getSource((Element) droppedObject);
+ Collection<?> targets = linkmappingHelper.getTarget((Element) droppedObject);
+ if (sources.size() == 0 || targets.size() == 0) {
return UnexecutableCommand.INSTANCE;
}
// binary association
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- dropBinaryLink(cc, source, target, linkVISUALID, dropRequest.getLocation(), (Element)droppedObject);
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
+ dropBinaryLink(cc, source, target, linkVISUALID, dropRequest.getLocation(), (Element) droppedObject);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
index bb9bba78c8c..4daa3cd3c52 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
@@ -110,7 +110,7 @@ public class MessageHelper extends ElementHelper {
// 3. Aggregates the create node command
// parentView = (View)((View)sourceEditPart.getModel()).eContainer();
CustomMessageViewCreateCommand nodeCreation = new CustomMessageViewCreateCommand(getEditingDomain(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), nodeLocation,
- (IAdaptable) ((ICommand) customMessageCreateComand).getCommandResult().getReturnValue(), link);
+ (IAdaptable) ((ICommand) customMessageCreateComand).getCommandResult().getReturnValue(), (View) link.getModel());
((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// return the command that contains the semantic creation and the view creation
return command;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/build.properties
index 9ab0cf4ba61..4ad531716e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/build.properties
@@ -1,7 +1,14 @@
#
#Mon Sep 12 09:29:45 CEST 2011
output..=bin/
-bin.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,messages.properties,about.html
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ messages.properties,\
+ about.html,\
+ model/
jars.compile.order=.
src.includes = about.html
source..=src/,custom-src/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram-notation.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram-notation.elementtypesconfigurations
new file mode 100644
index 00000000000..0edcb694e36
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram-notation.elementtypesconfigurations
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmi:id="_XB3QgM2QEeSF96aioTD1kQ" metamodelNsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XB33kc2QEeSF96aioTD1kQ" name="InterfacePortLink" identifier="org.eclipse.papyrus.uml.diagram.component.Link_4018" hint="4018" kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XB33kM2QEeSF96aioTD1kQ" name="Undefined" identifier="org.eclipse.papyrus.uml.diagram.component.Link_4016" hint="4016" kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.elementtypesconfigurations
new file mode 100644
index 00000000000..8b0394e22a2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.elementtypesconfigurations
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="ASCII"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmi:id="_WyQuQM2QEeSF96aioTD1kQ" name="PapyrusUMLComponentDiagram" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBmx0M2QEeSF96aioTD1kQ" name="Abstraction" identifier="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013" hint="4013">
+ <iconEntry xmi:id="_XBmx0c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_wXsM2QEeSF96aioTD1kQ" name="Comment" identifier="org.eclipse.papyrus.uml.diagram.component.Comment_3074" hint="3074">
+ <iconEntry xmi:id="_W_w-wM2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAwdQM2QEeSF96aioTD1kQ" name="Comment" identifier="org.eclipse.papyrus.uml.diagram.component.Comment_3201" hint="3201">
+ <iconEntry xmi:id="_XAxEUM2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBnY4M2QEeSF96aioTD1kQ" name="Comment Annotated Element" identifier="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008" hint="4015">
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment.AnnotatedElements</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_qREM2QEeSF96aioTD1kQ" name="Component" identifier="org.eclipse.papyrus.uml.diagram.component.Component_3070" hint="3070">
+ <iconEntry xmi:id="_W_q4IM2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Component.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_t7cM2QEeSF96aioTD1kQ" name="Component" identifier="org.eclipse.papyrus.uml.diagram.component.Component_3071" hint="3071">
+ <iconEntry xmi:id="_W_t7cc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Component.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAafAM2QEeSF96aioTD1kQ" name="Component" identifier="org.eclipse.papyrus.uml.diagram.component.Component_2002" hint="2002">
+ <iconEntry xmi:id="_XAafAc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Component.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBhSQM2QEeSF96aioTD1kQ" name="Component Realization" identifier="org.eclipse.papyrus.uml.diagram.component.ComponentRealization_4007" hint="4007">
+ <iconEntry xmi:id="_XBhSQc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/ComponentRealization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ComponentRealization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XB2pcM2QEeSF96aioTD1kQ" name="Connector" identifier="org.eclipse.papyrus.uml.diagram.component.Connector_4019" hint="4019">
+ <iconEntry xmi:id="_XB2pcc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Connector.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Connector</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_0CEM2QEeSF96aioTD1kQ" name="Constraint" identifier="org.eclipse.papyrus.uml.diagram.component.Constraint_3075" hint="3075">
+ <iconEntry xmi:id="_W_0CEc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Constraint.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XA180M2QEeSF96aioTD1kQ" name="Constraint" identifier="org.eclipse.papyrus.uml.diagram.component.Comment_3199" hint="3199">
+ <iconEntry xmi:id="_XA180c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Constraint.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBnY4c2QEeSF96aioTD1kQ" name="Constraint Constrained Element" identifier="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009" hint="4009">
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint.ConstrainedElements</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XA61UM2QEeSF96aioTD1kQ" name="Default Named Element" identifier="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204" hint="3204">
+ <iconEntry xmi:id="_XA61Uc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/NamedElement.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.NamedElement</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBxw8M2QEeSF96aioTD1kQ" name="Dependency" identifier="org.eclipse.papyrus.uml.diagram.component.Dependency_4017" hint="4017">
+ <iconEntry xmi:id="_XBxw8c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBsRYM2QEeSF96aioTD1kQ" name="Dependency Link" identifier="org.eclipse.papyrus.uml.diagram.component.Dependency_4010" hint="4010">
+ <iconEntry xmi:id="_XBsRYc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XATxUM2QEeSF96aioTD1kQ" name="Dependency Node" identifier="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203" hint="3203">
+ <iconEntry xmi:id="_XATxUc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBQzkM2QEeSF96aioTD1kQ" name="Generalization" identifier="org.eclipse.papyrus.uml.diagram.component.Generalization_4003" hint="4003">
+ <iconEntry xmi:id="_XBQzkc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_i8UM2QEeSF96aioTD1kQ" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.component.Interface_3078" hint="3078">
+ <iconEntry xmi:id="_W_i8Uc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAHkEM2QEeSF96aioTD1kQ" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.component.Interface_3072" hint="3072">
+ <iconEntry xmi:id="_XAHkEc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAq9sM2QEeSF96aioTD1kQ" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.component.Interface_3205" hint="3205">
+ <iconEntry xmi:id="_XAq9sc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBAU4M2QEeSF96aioTD1kQ" name="Interface" identifier="org.eclipse.papyrus.uml.diagram.component.Interface_2003" hint="2003">
+ <iconEntry xmi:id="_XBAU4c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBLUAM2QEeSF96aioTD1kQ" name="Interface Realization" identifier="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006" hint="4006">
+ <iconEntry xmi:id="_XBLUAc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/InterfaceRealization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InterfaceRealization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBbysM2QEeSF96aioTD1kQ" name="Manifestation" identifier="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014" hint="4014">
+ <iconEntry xmi:id="_XBbysc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Manifestation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Manifestation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_bnkM2QEeSF96aioTD1kQ" name="Model" identifier="org.eclipse.papyrus.uml.diagram.component.Model_3077" hint="3077">
+ <iconEntry xmi:id="_W_bnkc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Model.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Model</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAfXgM2QEeSF96aioTD1kQ" name="Model" identifier="org.eclipse.papyrus.uml.diagram.component.Model_3202" hint="3202">
+ <iconEntry xmi:id="_XAfXgc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Model.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Model</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_8k8M2QEeSF96aioTD1kQ" name="Operation" identifier="org.eclipse.papyrus.uml.diagram.component.Operation_5" hint="5">
+ <iconEntry xmi:id="_W_8k8c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W-nvQM2QEeSF96aioTD1kQ" name="Package" identifier="org.eclipse.papyrus.uml.diagram.component.Model_1000" hint="PapyrusUMLComponentDiagram">
+ <iconEntry xmi:id="_W-nvQc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_eq4M2QEeSF96aioTD1kQ" name="Package" identifier="org.eclipse.papyrus.uml.diagram.component.Package_3076" hint="3076">
+ <iconEntry xmi:id="_W_eq4c2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAmFMM2QEeSF96aioTD1kQ" name="Package" identifier="org.eclipse.papyrus.uml.diagram.component.Package_3200" hint="3200">
+ <iconEntry xmi:id="_XAmFMc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_X9MM2QEeSF96aioTD1kQ" name="Port" identifier="org.eclipse.papyrus.uml.diagram.component.Port_3069" hint="3069">
+ <iconEntry xmi:id="_W_X9Mc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_W_3FYM2QEeSF96aioTD1kQ" name="Property" identifier="org.eclipse.papyrus.uml.diagram.component.Property_1" hint="1">
+ <iconEntry xmi:id="_W_3FYc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XAORwM2QEeSF96aioTD1kQ" name="Property" identifier="org.eclipse.papyrus.uml.diagram.component.Property_3079" hint="3079">
+ <iconEntry xmi:id="_XAORwc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XACrkM2QEeSF96aioTD1kQ" name="Reception" identifier="org.eclipse.papyrus.uml.diagram.component.Reception_6" hint="6">
+ <iconEntry xmi:id="_XACrkc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Reception.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Reception</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBWTIM2QEeSF96aioTD1kQ" name="Substitution" identifier="org.eclipse.papyrus.uml.diagram.component.Substitution_4012" hint="4012">
+ <iconEntry xmi:id="_XBWTIc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Substitution.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Substitution</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_XBF0cM2QEeSF96aioTD1kQ" name="Usage" identifier="org.eclipse.papyrus.uml.diagram.component.Usage_4001" hint="4001">
+ <iconEntry xmi:id="_XBF0cc2QEeSF96aioTD1kQ" iconPath="/icons/full/obj16/Usage.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Usage</specializedTypesID>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
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 7c8ceae1549..471c295b2e1 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
@@ -27,7 +27,7 @@
liveValidationUIFeedback="true">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Model_1000"
displayName="ComponentDiagram"
@@ -56,7 +56,7 @@
containers="/0/@diagram/@topLevelNodes.1 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.12">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Port_3069"
editHelperClassName="PortEditHelper"/>
@@ -70,10 +70,6 @@
</viewmap>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomPortItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
<behaviour
@@ -186,7 +182,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1 /0/@diagram/@compartments.4">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Model_3077"
displayName="Model"
@@ -266,7 +262,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Package_3076"
displayName="Package"
@@ -342,7 +338,7 @@
containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -432,7 +428,7 @@
containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.0">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Component_3070"
displayName="Component"
@@ -552,7 +548,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Component_3071"
displayName="Component"
@@ -669,7 +665,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Comment_3074"
metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
@@ -737,7 +733,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Constraint_3075"
metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
@@ -829,7 +825,7 @@
containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.9">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -877,7 +873,7 @@
containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.10">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -925,7 +921,7 @@
containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.10">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -967,7 +963,7 @@
containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.3 /0/@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Interface_3072"
displayName="Interface"
@@ -1052,7 +1048,7 @@
containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1064,10 +1060,6 @@
</viewmap>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.itemsemantic.PropertyPartItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
<behaviour
@@ -1144,7 +1136,7 @@
createCommandClassName="DependencyNodeCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"
displayName="DependencyNode"
@@ -1226,7 +1218,7 @@
createCommandClassName="ComponentCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Component_2002"
editHelperClassName="ComponentEditHelper"/>
@@ -1341,7 +1333,7 @@
createCommandClassName="ModelCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Model_3202"
displayName="Model"
@@ -1420,7 +1412,7 @@
createCommandClassName="PackageCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Package_3200"
displayName="Package"
@@ -1499,7 +1491,7 @@
createCommandClassName="RectangleInterfaceCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1586,7 +1578,7 @@
createCommandClassName="CommentCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Comment_3201"
displayName="Comment"
@@ -1654,7 +1646,7 @@
createCommandClassName="ConstraintCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Comment_3199"
displayName="Constraint"
@@ -1745,7 +1737,7 @@
createCommandClassName="DefaultNamedElementCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204"
displayName="DefaultNamedElement"
@@ -1774,10 +1766,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.ComponentDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
@@ -1813,7 +1801,7 @@
createCommandClassName="InterfaceCreateCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Interface_2003"
editHelperClassName="InterfaceEditHelper"/>
@@ -1895,7 +1883,7 @@
reorientCommandClassName="UsageReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Usage_4001"
editHelperClassName="UsageEditHelper"/>
@@ -1940,7 +1928,7 @@
reorientCommandClassName="InterfaceRealizationReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006"
editHelperClassName="InterfaceRealizationEditHelper"/>
@@ -1985,7 +1973,7 @@
reorientCommandClassName="GeneralizationReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Generalization_4003"
editHelperClassName="GeneralizationEditHelper"/>
@@ -2051,7 +2039,7 @@
reorientCommandClassName="SubstitutionReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Substitution_4012"
displayName="Substitution"
@@ -2147,7 +2135,7 @@
reorientCommandClassName="ManifestationReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014"
displayName="Manifestation"
@@ -2243,7 +2231,7 @@
reorientCommandClassName="ComponentRealizationReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
editHelperClassName="ComponentRealizationEditHelper"/>
<viewmap
@@ -2338,7 +2326,7 @@
reorientCommandClassName="AbstractionReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013"
displayName="Abstraction"
@@ -2434,7 +2422,7 @@
reorientCommandClassName="LinkDescriptorReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:NotationType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2452,7 +2440,7 @@
reorientCommandClassName="CommentAnnotatedElementReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008"
displayName="CommentAnnotatedElement"/>
@@ -2477,7 +2465,7 @@
reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009"
displayName="ConstraintConstrainedElement"/>
@@ -2502,7 +2490,7 @@
reorientCommandClassName="DependencyReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
displayName="DependencyLink"
metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
@@ -2598,7 +2586,7 @@
reorientCommandClassName="DependencyBranchReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.component.Dependency_4017"
metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"
@@ -2642,7 +2630,7 @@
reorientCommandClassName="InterfacePortLinkReorientCommand">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:NotationType"
displayName="InterfacePortLink"/>
<viewmap
@@ -2654,7 +2642,7 @@
editPartClassName="ConnectorEditPart">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
+ <elementType definedExternally="true"
xsi:type="gmfgen:MetamodelType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
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 dce270504f4..5790d6e0737 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
@@ -278,362 +278,6 @@
<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">
@@ -646,43 +290,6 @@
</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>
@@ -1378,4 +985,12 @@
</diagramMappings>
</extension>
+<extension
+ point="org.eclipse.papyrus.infra.elementtypesconfigurations.elementTypeSetConfiguration">
+ <elementTypeSet
+ id="org.eclipse.papyrus.uml.diagram.component.elementTypeSet"
+ path="model/ComponentDiagram.elementtypesconfigurations">
+ </elementTypeSet>
+</extension>
+
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionReorientCommand.java
deleted file mode 100644
index fe5ca967cfd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Abstraction;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class AbstractionReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public AbstractionReorientCommand(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 Abstraction) {
- 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().canExistAbstraction_4013(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().canExistAbstraction_4013(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 Abstraction getLink() {
- return (Abstraction) 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java
deleted file mode 100644
index 8c30290d952..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java
+++ /dev/null
@@ -1,127 +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.component.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.component.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_3201(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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java
deleted file mode 100644
index 3c72136c021..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java
+++ /dev/null
@@ -1,127 +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.component.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.component.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 CommentCreateCommandPCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CommentCreateCommandPCN(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_3074(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.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
deleted file mode 100644
index 7540d2498a4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ComponentCreateCommand(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.getComponent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Component newElement = UMLFactory.eINSTANCE.createComponent();
-
- 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_Component_2002(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 9a427977230..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ComponentCreateCommandCN(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.getComponent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Component newElement = UMLFactory.eINSTANCE.createComponent();
-
- 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 {
-
- Component qualifiedTarget = (Component) target;
- qualifiedTarget.getPackagedElements()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Component_3070(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 53a2945ea9c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCreateCommandPCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ComponentCreateCommandPCN(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.getComponent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Component newElement = UMLFactory.eINSTANCE.createComponent();
-
- 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_Component_3071(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationReorientCommand.java
deleted file mode 100644
index 9fed05cf1c7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.ComponentRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class ComponentRealizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ComponentRealizationReorientCommand(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 ComponentRealization) {
- 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().canExistComponentRealization_4007(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().canExistComponentRealization_4007(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 ComponentRealization getLink() {
- return (ComponentRealization) 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java
deleted file mode 100644
index 2e7f2c5748a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Connector;
-import org.eclipse.uml2.uml.ConnectorEnd;
-import org.eclipse.uml2.uml.StructuredClassifier;
-
-/**
- * @generated
- */
-public class ConnectorReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ConnectorReorientCommand(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 Connector) {
- 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 ConnectorEnd && newEnd instanceof ConnectorEnd)) {
- return false;
- }
- if (getLink().getEnds()
- .size() != 1) {
- return false;
- }
- ConnectorEnd target = getLink().getEnds()
- .get(0);
- if (!(getLink().eContainer() instanceof StructuredClassifier)) {
- return false;
- }
- StructuredClassifier container = (StructuredClassifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConnector_4019(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof ConnectorEnd && newEnd instanceof ConnectorEnd)) {
- return false;
- }
- if (getLink().getEnds()
- .size() != 1) {
- return false;
- }
- ConnectorEnd source = getLink().getEnds()
- .get(0);
- if (!(getLink().eContainer() instanceof StructuredClassifier)) {
- return false;
- }
- StructuredClassifier container = (StructuredClassifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConnector_4019(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().getEnds()
- .remove(getOldSource());
- getLink().getEnds()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getEnds()
- .remove(getOldTarget());
- getLink().getEnds()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Connector getLink() {
- return (Connector) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getOldSource() {
- return (ConnectorEnd) oldEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getNewSource() {
- return (ConnectorEnd) newEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getOldTarget() {
- return (ConnectorEnd) oldEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getNewTarget() {
- return (ConnectorEnd) newEnd;
- }
-}
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
deleted file mode 100644
index a33dcd6a7de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.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 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 {
-
- 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_3199(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.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
deleted file mode 100644
index 9c2ed818a5d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
+++ /dev/null
@@ -1,128 +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.component.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.component.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 ConstraintCreateCommandPCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommandPCN(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_3075(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.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
deleted file mode 100644
index e40aad4d05a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
+++ /dev/null
@@ -1,99 +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.component.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.NamedElement;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DefaultNamedElementCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DefaultNamedElementCreateCommand(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.getNamedElement());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 63bd52b33d5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
+++ /dev/null
@@ -1,126 +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.component.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyReorientCommand.java
deleted file mode 100644
index 9def2e1c8cf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.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_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.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
deleted file mode 100644
index 8398ae31adf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java
+++ /dev/null
@@ -1,171 +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.component.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.component.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationReorientCommand.java
deleted file mode 100644
index efd06b815d0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationReorientCommand.java
+++ /dev/null
@@ -1,174 +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.component.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.component.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.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
deleted file mode 100644
index e648066c15b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InterfaceCreateCommand(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.getInterface());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
- 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_Interface_3078(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 4ca0835d18a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceCreateCommandPCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InterfaceCreateCommandPCN(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.getInterface());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
- 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_Interface_3072(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationReorientCommand.java
deleted file mode 100644
index 80896f8acf8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationReorientCommand.java
+++ /dev/null
@@ -1,182 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.InterfaceRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class InterfaceRealizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public InterfaceRealizationReorientCommand(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 InterfaceRealization) {
- 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;
- }
- Interface target = getLink().getContract();
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistInterfaceRealization_4006(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Interface && newEnd instanceof Interface)) {
- 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().canExistInterfaceRealization_4006(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().setContract(
- getNewTarget()
- );
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected InterfaceRealization getLink() {
- return (InterfaceRealization) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldSource() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewSource() {
- return (NamedElement) newEnd;
- }
-
- /**
- * @generated
- */
- protected Interface getOldTarget() {
- return (Interface) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Interface getNewTarget() {
- return (Interface) newEnd;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationReorientCommand.java
deleted file mode 100644
index 518256ac29e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @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 Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4014(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().canExistManifestation_4014(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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java
deleted file mode 100644
index 079a00e0f44..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java
+++ /dev/null
@@ -1,127 +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.component.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.component.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_3202(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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java
deleted file mode 100644
index 12097649cdb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.component.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.component.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_3077(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.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
deleted file mode 100644
index f8597517e23..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class OperationForInterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public OperationForInterfaceCreateCommand(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.getOperation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- Interface qualifiedTarget = (Interface) target;
- qualifiedTarget.getOwnedOperations()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Operation_5(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java
deleted file mode 100644
index a20fd3f818d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java
+++ /dev/null
@@ -1,126 +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.component.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.component.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_3200(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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java
deleted file mode 100644
index b104f7b69a4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java
+++ /dev/null
@@ -1,126 +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.component.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.component.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_3076(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.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
deleted file mode 100644
index 404e4a0475b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PropertyCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PropertyCreateCommand(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.getProperty());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- StructuredClassifier qualifiedTarget = (StructuredClassifier) target;
- qualifiedTarget.getOwnedAttributes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Property_3079(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 3d92257ae90..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PropertyForInterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PropertyForInterfaceCreateCommand(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.getProperty());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- Interface qualifiedTarget = (Interface) target;
- qualifiedTarget.getOwnedAttributes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Property_1(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index 48d196fbd29..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Reception;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ReceptionInInterfaceCreateCommand(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.getReception());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Reception newElement = UMLFactory.eINSTANCE.createReception();
-
- 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 {
-
- Interface qualifiedTarget = (Interface) target;
- qualifiedTarget.getOwnedReceptions()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Reception_6(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.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
deleted file mode 100644
index bc00c31d6a2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
+++ /dev/null
@@ -1,128 +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.component.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.component.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class RectangleInterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public RectangleInterfaceCreateCommand(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.getInterface());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
- 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_Interface_3205(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionReorientCommand.java
deleted file mode 100644
index 4d465c90f7b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Substitution;
-
-/**
- * @generated
- */
-public class SubstitutionReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public SubstitutionReorientCommand(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 Substitution) {
- 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().canExistSubstitution_4012(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().canExistSubstitution_4012(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 Substitution getLink() {
- return (Substitution) 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/UsageReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/UsageReorientCommand.java
deleted file mode 100644
index 9cdb5535431..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/UsageReorientCommand.java
+++ /dev/null
@@ -1,187 +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.component.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.component.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Usage;
-
-/**
- * @generated
- */
-public class UsageReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public UsageReorientCommand(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 Usage) {
- 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().canExistUsage_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 Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistUsage_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 Usage getLink() {
- return (Usage) 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/AbstractionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/AbstractionEditHelper.java
deleted file mode 100644
index 0aaa2fb0987..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/AbstractionEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class AbstractionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/CommentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/CommentEditHelper.java
deleted file mode 100644
index d867b03bf70..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/CommentEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CommentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentEditHelper.java
deleted file mode 100644
index 5a5261b18a0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ComponentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentRealizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentRealizationEditHelper.java
deleted file mode 100644
index 74b7b1a764a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ComponentRealizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ComponentRealizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConnectorEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConnectorEditHelper.java
deleted file mode 100644
index 4ed8130db00..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConnectorEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ConnectorEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConstraintEditHelper.java
deleted file mode 100644
index 86419a56111..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DefaultNamedElementEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DefaultNamedElementEditHelper.java
deleted file mode 100644
index 9277c75fc70..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DefaultNamedElementEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DefaultNamedElementEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyBranchLink.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyBranchLink.java
deleted file mode 100644
index 955107af214..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyBranchLink.java
+++ /dev/null
@@ -1,17 +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.component.edit.helpers;
-
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
-
-public class DependencyBranchLink extends AbstractEditHelperAdvice {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyEditHelper.java
deleted file mode 100644
index fee54a226b2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/DependencyEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DependencyEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/GeneralizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/GeneralizationEditHelper.java
deleted file mode 100644
index 197ee6e2b6d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/GeneralizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class GeneralizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceEditHelper.java
deleted file mode 100644
index fffbca45b1c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InterfaceEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceRealizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceRealizationEditHelper.java
deleted file mode 100644
index 63c8301b7b8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/InterfaceRealizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InterfaceRealizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ManifestationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ManifestationEditHelper.java
deleted file mode 100644
index 7d802c47872..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ManifestationEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ManifestationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/OperationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/OperationEditHelper.java
deleted file mode 100644
index 62026b1ad8b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/OperationEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class OperationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PackageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PackageEditHelper.java
deleted file mode 100644
index 601c7bfaccf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PackageEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PackageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PortEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PortEditHelper.java
deleted file mode 100644
index c76e52baced..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PortEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PortEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PropertyEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PropertyEditHelper.java
deleted file mode 100644
index 50830782442..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/PropertyEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PropertyEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ReceptionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ReceptionEditHelper.java
deleted file mode 100644
index 194b7528f96..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/ReceptionEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ReceptionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/SubstitutionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/SubstitutionEditHelper.java
deleted file mode 100644
index 1aa28fec780..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/SubstitutionEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class SubstitutionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/UsageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/UsageEditHelper.java
deleted file mode 100644
index e303bde5cb1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/helpers/UsageEditHelper.java
+++ /dev/null
@@ -1,20 +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.component.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class UsageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionEditPart.java
index 50ec9e95141..b908c5f41c3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionEditPart.java
@@ -17,13 +17,13 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy;
-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.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.AbstractionItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +48,8 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AbstractionItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeAbstractionLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeAbstractionLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentAnnotatedElementEditPart.java
index bd465a9890e..4965a49bb30 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentAnnotatedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentAnnotatedElementEditPart.java
@@ -17,9 +17,9 @@ 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.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
/**
* @generated
@@ -44,7 +44,7 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentAnnotatedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 5dc374333f4..beb67a0e0b7 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
@@ -450,8 +450,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 d08234236bb..1748aca2ad3 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
@@ -450,8 +450,7 @@ public class CommentBodyEditPartPCN extends PapyrusCompartmentEditPart implement
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 1d38121a3b3..300e2759f41 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -35,7 +37,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure;
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.edit.policies.CommentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +73,10 @@ public class CommentEditPart extends AbstractCommentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
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/CommentEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java
index 8377ebd406c..07b01846eac 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -35,7 +37,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.CommentItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +73,10 @@ public class CommentEditPartPCN extends AbstractCommentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicyPCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
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 6a6737334ac..60f34fc169a 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
@@ -27,11 +27,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -66,8 +66,8 @@ public class ComponentCompositeCompartmentEditPart extends ShapeCompartmentEditP
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 c6c47780590..bbce47fb217 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
@@ -27,11 +27,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -66,8 +66,8 @@ public class ComponentCompositeCompartmentEditPartCN extends ShapeCompartmentEdi
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 67297b1991a..de812c2dca0 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
@@ -27,11 +27,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -66,8 +66,8 @@ public class ComponentCompositeCompartmentEditPartPCN extends ShapeCompartmentEd
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeCompartmentItemSemanticEditPolicyPCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 a64d309e534..c6605965380 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
@@ -14,11 +14,11 @@ package org.eclipse.papyrus.uml.diagram.component.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentDiagramItemSemanticEditPolicy;
/**
* @generated
@@ -49,10 +49,10 @@ public class ComponentDiagramEditPart extends PapyrusDiagramEditPart {
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentDiagramItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
// 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());
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 fc0bfb9ec6f..548a7902422 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
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
@@ -56,7 +58,6 @@ import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiag
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.edit.policies.ComponentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -92,9 +93,12 @@ public class ComponentEditPart extends RoundedCompartmentEditPart {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
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());
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 a7ddfc70e7e..0d3ba1e145f 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
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
@@ -56,7 +58,6 @@ import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiag
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.edit.policies.ComponentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -92,9 +93,12 @@ public class ComponentEditPartCN extends RoundedCompartmentEditPart {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
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());
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 90ec5640ebe..95b1e5b9273 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
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
@@ -56,7 +58,6 @@ import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiag
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.edit.policies.ComponentItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -92,9 +93,12 @@ public class ComponentEditPartPCN extends RoundedCompartmentEditPart {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicyPCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
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());
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
index a655aa1263a..28c33d353b1 100644
--- 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
@@ -484,8 +484,7 @@ public class ComponentFloatingLabelEditPart extends FloatingLabelEditPart implem
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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
index 463399258ef..5df6deb87fc 100644
--- 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
@@ -484,8 +484,7 @@ public class ComponentFloatingLabelEditPartCN extends FloatingLabelEditPart impl
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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
index 1351f68e034..a7848845a93 100644
--- 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
@@ -484,8 +484,7 @@ public class ComponentFloatingLabelEditPartPCN extends FloatingLabelEditPart imp
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 c121d071fbc..d423dc194d1 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
@@ -464,8 +464,7 @@ public class ComponentNameEditPart extends PapyrusCompartmentEditPart implements
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 197404d597d..b20200ea9e6 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
@@ -464,8 +464,7 @@ public class ComponentNameEditPartCN extends PapyrusCompartmentEditPart implemen
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 357109a7a73..59a01b487f7 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
@@ -450,8 +450,7 @@ public class ComponentNameEditPartPCN extends PapyrusCompartmentEditPart impleme
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationEditPart.java
index bc62c5c563c..f51463be820 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationEditPart.java
@@ -17,13 +17,12 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.InterfaceRealizationFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentRealizationItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +47,8 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentRealizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 9c5e7b0784a..e9aab828f97 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
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -146,7 +145,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
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());
}
@@ -467,8 +465,7 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorEditPart.java
index d9cb8efeae0..0669ea64218 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorEditPart.java
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.component.custom.figure.edges.ConnectorFigure;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ConnectorItemSemanticEditPolicy;
/**
* @generated
@@ -45,8 +44,8 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConnectorItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintConstrainedElementEditPart.java
index 0dd94c9ff42..9289577b2f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintConstrainedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintConstrainedElementEditPart.java
@@ -16,10 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
/**
* @generated
@@ -44,7 +44,7 @@ public class ConstraintConstrainedElementEditPart extends UMLConnectionNodeEditP
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintConstrainedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 750252d11a5..2adcf32c7fe 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -34,7 +36,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
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.edit.policies.ConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -71,7 +72,10 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
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/ConstraintEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java
index c57ec138618..6aff361f1e7 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -34,7 +36,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ConstraintItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -71,7 +72,10 @@ public class ConstraintEditPartPCN extends AbstractConstraintEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicyPCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
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 ad2eecedb26..b79d92093cf 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
@@ -464,8 +464,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 57df0873596..91a84f9be63 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
@@ -464,8 +464,7 @@ public class ConstraintNameEditPartPCN extends PapyrusCompartmentEditPart implem
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 d0b4719b6f5..1e781399e4d 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
@@ -464,8 +464,7 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 bc40e1dd6ba..a7a664335e7 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
@@ -464,8 +464,7 @@ public class ConstraintSpecificationEditPartPCN extends PapyrusCompartmentEditPa
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 5e62bd4a774..90bb2135a3a 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
@@ -25,6 +25,8 @@ 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.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -35,8 +37,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.ComponentDiagramChangeStereotypedShapeEditpolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.DefaultNamedElementItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -73,13 +73,15 @@ public class DefaultNamedElementEditPart extends NodeEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultNamedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
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 ComponentDiagramChangeStereotypedShapeEditpolicy());
- 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);
}
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 8331d5c01b7..6f67d8b7888 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
@@ -450,8 +450,7 @@ public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyBranchEditPart.java
index ad0483a25bf..746bb017142 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyBranchEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyBranchEditPart.java
@@ -16,10 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.DependencyBranchItemSemanticEditPolicy;
/**
* @generated
@@ -44,7 +44,7 @@ public class DependencyBranchEditPart extends UMLConnectionNodeEditPart implemen
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyBranchItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyEditPart.java
index 640b91e4a89..f28cd35480f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyEditPart.java
@@ -17,13 +17,12 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.DependencyItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +47,8 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 06f68a62602..a8c75e7bc3a 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
@@ -31,6 +31,8 @@ import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -40,7 +42,6 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigu
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;
import org.eclipse.swt.graphics.Color;
@@ -77,7 +78,10 @@ public class DependencyNodeEditPart extends NodeEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
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
index 3875c35474d..799565ef75b 100644
--- 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
@@ -484,8 +484,7 @@ public class DependencyNodeFloatingLabelEditPart extends FloatingLabelEditPart i
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationEditPart.java
index 2799eef9936..812f7ccf3e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationEditPart.java
@@ -17,13 +17,12 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.GeneralizationItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +47,8 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 6a0658bdfa3..c75f8ba6c3b 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
@@ -27,10 +27,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -73,8 +73,8 @@ public class InterfaceAttributeCompartmentEditPart extends ResizeableListCompart
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceAttributeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 2cf300c5346..58ea1250fa1 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
@@ -27,10 +27,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -73,8 +73,8 @@ public class InterfaceAttributeCompartmentEditPartCN extends ListCompartmentEdit
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceAttributeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 47f3e7b2502..a35ee21efe9 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
@@ -33,6 +33,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -43,7 +45,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPosit
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;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,7 +81,10 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
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 1f195f8246e..70eb26d62ae 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
@@ -33,6 +33,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -44,7 +46,6 @@ import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiag
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.LollipopInterfaceFigure;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,7 +82,10 @@ public class InterfaceEditPartPCN extends RoundedCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicyPCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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/InterfaceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java
index 723192c53fb..b788f4f2bda 100644
--- 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
@@ -484,8 +484,7 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart implem
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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
index 248bac7a5e3..02a31fc2a08 100644
--- 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
@@ -484,8 +484,7 @@ public class InterfaceFloatingLabelEditPartPCN extends FloatingLabelEditPart imp
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 6b1e69b1cb5..ca35b24e099 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
@@ -484,8 +484,7 @@ public class InterfaceNameEditPart extends PapyrusLabelEditPart implements IText
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 a1e283d9a90..f1d9562c660 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
@@ -484,8 +484,7 @@ public class InterfaceNameEditPartPCN extends PapyrusLabelEditPart implements IT
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 299bd95aafe..98fca7e57c2 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
@@ -27,10 +27,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -73,8 +73,8 @@ public class InterfaceOperationCompartmentEditPart extends ResizeableListCompart
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceOperationCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 0418c9b7215..005ccc2f097 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
@@ -27,10 +27,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -73,8 +73,8 @@ public class InterfaceOperationCompartmentEditPartCN extends ListCompartmentEdit
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceOperationCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceRealizationEditPart.java
index 35005267aec..739f7e4f125 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceRealizationEditPart.java
@@ -16,10 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.edges.InterfaceRealizationLinkFigure;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceRealizationItemSemanticEditPolicy;
/**
* @generated
@@ -44,7 +44,7 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceRealizationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationEditPart.java
index f28052c028d..c02a9d667d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationEditPart.java
@@ -17,13 +17,13 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.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.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ManifestationItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +48,8 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ManifestationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
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 955d011e7df..af6496c6c63 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -36,7 +38,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
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.edit.policies.ModelItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -73,7 +74,10 @@ public class ModelEditPart extends PackageEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
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 1abf5f63808..c7f679aafd5 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -36,7 +38,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
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.edit.policies.ModelItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -73,7 +74,10 @@ public class ModelEditPartCN extends PackageEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
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 dd392fb892e..08192c77391 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
@@ -464,8 +464,7 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 8a75ac32c08..b50a52a3d9d 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
@@ -464,8 +464,7 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 4f91d749a8f..5cf9b3f80c3 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
@@ -25,11 +25,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -63,8 +63,8 @@ public class ModelPackageableElementCompartmentEditPart extends ShapeCompartment
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 8c96027ad26..b1dd3235afd 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
@@ -25,11 +25,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -63,8 +63,8 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 9abdb3928e1..1797adf749f 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
@@ -482,8 +482,7 @@ public class MultiDependencyLabelEditPart extends PapyrusLabelEditPart implement
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 15755265b64..54e6eaab6a0 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
@@ -63,6 +63,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.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -72,7 +73,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.AppliedStereotypePropertyDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.OperationForInterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
@@ -158,7 +158,7 @@ public class OperationForInterfaceEditPart extends UMLCompartmentEditPart implem
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OperationForInterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -475,8 +475,7 @@ public class OperationForInterfaceEditPart extends UMLCompartmentEditPart implem
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 f12cdf4b3e3..72fba7b285f 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -35,7 +37,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
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.edit.policies.PackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +73,10 @@ public class PackageEditPart extends org.eclipse.papyrus.uml.diagram.common.edit
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
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 1770468da5c..55818360d46 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
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -36,7 +38,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
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.edit.policies.PackageItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -73,7 +74,10 @@ public class PackageEditPartCN extends PackageEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
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 f5eccbef0e8..b1480ddff79 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
@@ -464,8 +464,7 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 1a8cebb1f9c..63944e81624 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
@@ -464,8 +464,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 4af1a3c9818..96121e13e8e 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
@@ -25,11 +25,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -63,8 +63,8 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 01d1310c1ec..1b99929fab6 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
@@ -25,11 +25,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.Messages;
/**
@@ -63,8 +63,8 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
// in Papyrus diagrams are not strongly synchronised
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 56af9754018..17372c9e22c 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
@@ -487,8 +487,7 @@ public class PortAppliedStereotypeEditPart extends PapyrusLabelEditPart implemen
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 43eca73eb1b..53742376b98 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
@@ -34,6 +34,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,10 +47,8 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPoli
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
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.CustomPortItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.PortLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.PortFigure;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.PortItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -86,9 +86,11 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PortItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPortItemSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new PortLayoutEditPolicy());
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 4f810f94fa6..7a8e998823f 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
@@ -488,8 +488,7 @@ public class PortNameEditPart extends PapyrusLabelEditPart implements ITextAware
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 4c97a8305ea..fe9cbcb5236 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
@@ -63,6 +63,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.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -72,7 +73,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.AppliedStereotypePropertyDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.PropertyForInterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
@@ -158,7 +158,7 @@ public class PropertyForInterfaceEditPart extends UMLCompartmentEditPart impleme
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyForInterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -475,8 +475,7 @@ public class PropertyForInterfaceEditPart extends UMLCompartmentEditPart impleme
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 f5433ef6b2f..32d85447d62 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
@@ -29,6 +29,9 @@ 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.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -37,7 +40,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabe
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.MaskManagedNodeEditPolicy;
-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;
@@ -45,9 +47,7 @@ import org.eclipse.papyrus.uml.diagram.component.custom.edit.part.CustomProperty
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.edit.policies.PropertyItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -83,15 +83,17 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
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());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyPartItemSemanticEditPolicyCN());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
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 9256660950f..db31e5a0caa 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
@@ -466,8 +466,7 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 7fd5b5f77a3..2f2f6bcaced 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
@@ -64,12 +64,12 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.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.DefaultSemanticEditPolicy;
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.component.edit.policies.ReceptionInInterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
@@ -155,7 +155,7 @@ public class ReceptionInInterfaceEditPart extends CompartmentEditPart implements
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReceptionInInterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -470,8 +470,7 @@ public class ReceptionInInterfaceEditPart extends CompartmentEditPart implements
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 baea545dbe5..7c0c959584d 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
@@ -38,17 +38,18 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
import org.eclipse.swt.graphics.Color;
@@ -85,9 +86,12 @@ public class RectangleInterfaceEditPart extends RoundedCompartmentEditPart {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new RectangleInterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
@@ -376,13 +380,13 @@ public class RectangleInterfaceEditPart extends RoundedCompartmentEditPart {
if (request instanceof CreateViewAndElementRequest) {
CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
IElementType type = (IElementType) adapter.getAdapter(IElementType.class);
- if (type == UMLElementTypes.Property_1) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Property_1)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPart.VISUAL_ID));
}
- if (type == UMLElementTypes.Operation_5) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Operation_5)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPart.VISUAL_ID));
}
- if (type == UMLElementTypes.Reception_6) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Reception_6)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPart.VISUAL_ID));
}
}
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 f5ab38b75af..7ee482e12dc 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
@@ -38,17 +38,18 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
import org.eclipse.swt.graphics.Color;
@@ -85,9 +86,12 @@ public class RectangleInterfaceEditPartCN extends RoundedCompartmentEditPart {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
@@ -376,13 +380,13 @@ public class RectangleInterfaceEditPartCN extends RoundedCompartmentEditPart {
if (request instanceof CreateViewAndElementRequest) {
CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
IElementType type = (IElementType) adapter.getAdapter(IElementType.class);
- if (type == UMLElementTypes.Property_1) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Property_1)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPartCN.VISUAL_ID));
}
- if (type == UMLElementTypes.Operation_5) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Operation_5)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPartCN.VISUAL_ID));
}
- if (type == UMLElementTypes.Reception_6) {
+ if (UMLElementTypes.isKindOf(type, UMLElementTypes.Reception_6)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPartCN.VISUAL_ID));
}
}
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
index 41590553c72..7790596b598 100644
--- 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
@@ -484,8 +484,7 @@ public class RectangleInterfaceFloatingLabelEditPart extends FloatingLabelEditPa
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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
index 55d0f698521..8efd31f5711 100644
--- 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
@@ -484,8 +484,7 @@ public class RectangleInterfaceFloatingLabelEditPartCN extends FloatingLabelEdit
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 f2828ff8ba4..81d6f4996eb 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
@@ -464,8 +464,7 @@ public class RectangleInterfaceNameEditPart extends PapyrusCompartmentEditPart i
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
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 9d3279f9ed4..516fac6d0f8 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
@@ -450,8 +450,7 @@ public class RectangleInterfaceNameEditPartCN extends PapyrusCompartmentEditPart
else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionEditPart.java
index 7378369ec35..e3ca95d1749 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionEditPart.java
@@ -17,13 +17,13 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.AppliedStereotypeSubstitutionLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.SubstitutionItemSemanticEditPolicy;
/**
* @generated
@@ -48,8 +48,8 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SubstitutionItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeSubstitutionLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeSubstitutionLabelDisplayEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UsageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UsageEditPart.java
index 7f03d83657f..2f98fa4fa5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UsageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UsageEditPart.java
@@ -16,10 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.edges.UsageLinkFigure;
-import org.eclipse.papyrus.uml.diagram.component.edit.policies.UsageItemSemanticEditPolicy;
/**
* @generated
@@ -44,7 +44,7 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UsageItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/AbstractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/AbstractionItemSemanticEditPolicy.java
deleted file mode 100644
index 79c42864188..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/AbstractionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class AbstractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public AbstractionItemSemanticEditPolicy() {
- super(UMLElementTypes.Abstraction_4013);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
deleted file mode 100644
index f1796ad8cb0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentAnnotatedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.CommentAnnotatedElement_4015);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicy.java
deleted file mode 100644
index 279d1ad47b9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,161 +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.component.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.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_3201);
- }
-
- /**
- * @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_4015 == 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_4015 == 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicyPCN.java
deleted file mode 100644
index 9d1dd93db55..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/CommentItemSemanticEditPolicyPCN.java
+++ /dev/null
@@ -1,161 +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.component.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.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicyPCN() {
- super(UMLElementTypes.Comment_3074);
- }
-
- /**
- * @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_4015 == 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_4015 == 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicy.java
deleted file mode 100644
index 72ae415ef5a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCanonicalEditPolicy 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.getStructuredClassifier_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponent_2002SemanticChildren(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 PortEditPart.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
- .getComponent_2002SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyCN.java
deleted file mode 100644
index cd366e7f837..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCanonicalEditPolicyCN 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.getStructuredClassifier_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponent_3070SemanticChildren(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 PortEditPart.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
- .getComponent_3070SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyPCN.java
deleted file mode 100644
index 81b70e6c50e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCanonicalEditPolicyPCN.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCanonicalEditPolicyPCN 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.getStructuredClassifier_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponent_3071SemanticChildren(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 PortEditPart.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
- .getComponent_3071SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index 50f96c0105c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,190 +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.component.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.component.edit.parts.ComponentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentCanonicalEditPolicy 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.getComponent_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7001SemanticChildren(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 == ComponentEditPartCN.VISUAL_ID || visualID == PropertyPartEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7001SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyCN.java
deleted file mode 100644
index 6464c2b164c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,190 +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.component.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.component.edit.parts.ComponentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentCanonicalEditPolicyCN 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.getComponent_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7003SemanticChildren(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 == ComponentEditPartCN.VISUAL_ID || visualID == PropertyPartEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7003SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyPCN.java
deleted file mode 100644
index ba99c2b1819..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentCanonicalEditPolicyPCN.java
+++ /dev/null
@@ -1,190 +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.component.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.component.edit.parts.ComponentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentCanonicalEditPolicyPCN 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.getComponent_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7004SemanticChildren(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 == ComponentEditPartCN.VISUAL_ID || visualID == PropertyPartEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getComponentPackagedelements_7004SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 404dba00db8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,57 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Component_2002);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Component_3070 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3079 == requestElementType) {
-
- return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 702d99fe40b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,57 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Component_3070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Component_3070 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3079 == requestElementType) {
-
- return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java
deleted file mode 100644
index 9a95064f849..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java
+++ /dev/null
@@ -1,57 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentItemSemanticEditPolicyPCN() {
- super(UMLElementTypes.Component_3071);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Component_3070 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3079 == requestElementType) {
-
- return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java
deleted file mode 100644
index 47f9bd31b6d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,125 +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.component.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DefaultNamedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyNodeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ModelCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PackageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.RectangleInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentDiagramItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_1000);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Dependency_3203 == requestElementType) {
-
- return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_2002 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Model_3202 == requestElementType) {
-
- return getGEFWrapper(new ModelCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Package_3200 == requestElementType) {
-
- return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3205 == requestElementType) {
-
- return getGEFWrapper(new RectangleInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3201 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3199 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.NamedElement_3204 == requestElementType) {
-
- return getGEFWrapper(new DefaultNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_2003 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
- }
-
- /**
- * @generated
- */
- private static class DuplicateAnythingCommand extends DuplicateEObjectsCommand {
-
- /**
- * @generated
- */
- public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req) {
- super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java
deleted file mode 100644
index 2dd4714ccba..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,352 +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.component.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentItemSemanticEditPolicy() {
- super(UMLElementTypes.Component_2002);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java
deleted file mode 100644
index e4d51573bba..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,352 +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.component.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Component_3070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java
deleted file mode 100644
index 7b7c673f181..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java
+++ /dev/null
@@ -1,352 +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.component.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentItemSemanticEditPolicyPCN() {
- super(UMLElementTypes.Component_3071);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentRealizationItemSemanticEditPolicy.java
deleted file mode 100644
index 7a4a1114586..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentRealizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentRealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentRealizationItemSemanticEditPolicy() {
- super(UMLElementTypes.ComponentRealization_4007);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConnectorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConnectorItemSemanticEditPolicy.java
deleted file mode 100644
index 78f32227ba3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConnectorItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConnectorItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConnectorItemSemanticEditPolicy() {
- super(UMLElementTypes.Connector_4019);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
deleted file mode 100644
index e1dafcfd7af..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.ConstraintConstrainedElement_4009);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 9283786c8f6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,317 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_3199);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicyPCN.java
deleted file mode 100644
index 30e26bac2e1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ConstraintItemSemanticEditPolicyPCN.java
+++ /dev/null
@@ -1,317 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicyPCN() {
- super(UMLElementTypes.Constraint_3075);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyItemSemanticEditPolicy.java
deleted file mode 100644
index a11207a6368..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyItemSemanticEditPolicy() {
- 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyNodeItemSemanticEditPolicy.java
deleted file mode 100644
index ab112cf24a7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DependencyNodeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyNodeItemSemanticEditPolicy() {
- super(UMLElementTypes.Dependency_3203);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/GeneralizationItemSemanticEditPolicy.java
deleted file mode 100644
index 17acd7a6e2a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,154 +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.component.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.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.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_4015 == 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_4015 == 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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index 8f926cb94d4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PropertyForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceAttributeCompartmentCanonicalEditPolicy 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.getInterface_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getInterfaceAttributes_7008SemanticChildren(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 PropertyForInterfaceEditPart.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
- .getInterfaceAttributes_7008SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicyCN.java
deleted file mode 100644
index b167de4f5fb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PropertyForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceAttributeCompartmentCanonicalEditPolicyCN 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.getInterface_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getInterfaceAttributes_7010SemanticChildren(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 PropertyForInterfaceEditPart.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
- .getInterfaceAttributes_7010SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 62681741294..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,51 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyForInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceAttributeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceAttributeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Interface_3205);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_1 == requestElementType) {
-
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 23354e66306..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,51 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyForInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceAttributeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Interface_3078);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_1 == requestElementType) {
-
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
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
deleted file mode 100644
index 67686941d94..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,429 +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.component.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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceAttributeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceOperationCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.OperationForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Interface_3078);
- }
-
- /**
- * @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 InterfaceAttributeCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case PropertyForInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- }
- }
- break;
- case InterfaceOperationCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case OperationForInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- case ReceptionInInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicyPCN.java
deleted file mode 100644
index 1d6644e2756..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicyPCN.java
+++ /dev/null
@@ -1,334 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceItemSemanticEditPolicyPCN() {
- super(UMLElementTypes.Interface_3072);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index e8f1210b947..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,190 +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.component.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.component.edit.parts.OperationForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceOperationCompartmentCanonicalEditPolicy 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.getInterface_OwnedOperation());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInterface_OwnedReception());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getInterfaceOperations_7009SemanticChildren(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 == OperationForInterfaceEditPart.VISUAL_ID || visualID == ReceptionInInterfaceEditPart.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getInterfaceOperations_7009SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicyCN.java
deleted file mode 100644
index 7409978dfe1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,190 +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.component.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.component.edit.parts.OperationForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceOperationCompartmentCanonicalEditPolicyCN 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.getInterface_OwnedOperation());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInterface_OwnedReception());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getInterfaceOperations_7011SemanticChildren(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 == OperationForInterfaceEditPart.VISUAL_ID || visualID == ReceptionInInterfaceEditPart.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getInterfaceOperations_7011SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 361e1ee23c1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,57 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.OperationForInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ReceptionInInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceOperationCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceOperationCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Interface_3205);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Operation_5 == requestElementType) {
-
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Reception_6 == requestElementType) {
-
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index d6612526ebf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,57 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.OperationForInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ReceptionInInterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceOperationCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceOperationCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Interface_3078);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Operation_5 == requestElementType) {
-
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Reception_6 == requestElementType) {
-
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java
deleted file mode 100644
index be7fe08ea01..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceRealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceRealizationItemSemanticEditPolicy() {
- super(UMLElementTypes.InterfaceRealization_4006);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ManifestationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ManifestationItemSemanticEditPolicy.java
deleted file mode 100644
index 6f7f74d7853..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ManifestationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ManifestationItemSemanticEditPolicy() {
- super(UMLElementTypes.Manifestation_4014);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.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
deleted file mode 100644
index b7b5a6c3a0a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java
+++ /dev/null
@@ -1,692 +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.component.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.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.SetBoundsCommand;
-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.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.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentDiagramEditPart;
-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.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DefaultNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-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.InterfacePortLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.LinkDescriptorEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartEditPartCN;
-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.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLLinkDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.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());
- 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
- .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 ComponentEditPart.VISUAL_ID:
- case ModelEditPart.VISUAL_ID:
- case PackageEditPart.VISUAL_ID:
- case RectangleInterfaceEditPart.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case DefaultNamedElementEditPart.VISUAL_ID:
- case InterfaceEditPart.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)
- HashMap<UMLNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<UMLNodeDescriptor, LinkedList<View>>();
- //
- // 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
- LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
- 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
- } else {
- potentialMatch.add(childView);
- }
- }
- }
- 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());
- } else if (potentialMatch.size() > 0) {
- potentialViews.put(next, potentialMatch);
- }
- }
- // 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);
- //
- CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(host().getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize);
- 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);
- LinkedList<View> possibleMatches = potentialViews.get(next);
- if (possibleMatches != null) {
- // from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
- possibleMatches.retainAll(knownViewChildren);
- }
- if (possibleMatches != null && !possibleMatches.isEmpty()) {
- View originalView = possibleMatches.getFirst();
- knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
- // add command to copy properties
- if (originalView instanceof Node) {
- if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
- Bounds b = (Bounds) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
- Location l = (Location) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Point(l.getX(), l.getY())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
- Size s = (Size) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Dimension(s.getWidth(), s.getHeight())));
- }
- }
- }
- }
-
- 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);
- if (boundsCommand.canExecute()) {
- executeCommand(new ICommandProxy(boundsCommand.reduce()));
- }
- @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 || diagramLinkVisualID == InterfacePortLinkEditPart.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 (!ComponentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case ComponentDiagramEditPart.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_3203ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ComponentEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComponent_2002ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ModelEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getModel_3202ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PackageEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPackage_3200ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case RectangleInterfaceEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_3205ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case CommentEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_3201ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ConstraintEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_3199ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DefaultNamedElementEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getNamedElement_3204ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case InterfaceEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_2003ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PortEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPort_3069ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ModelEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getModel_3077ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PackageEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPackage_3076ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case RectangleInterfaceEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_3078ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ComponentEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComponent_3070ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ComponentEditPartPCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComponent_3071ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case CommentEditPartPCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_3074ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ConstraintEditPartPCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_3075ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case InterfaceEditPartPCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_3072ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PropertyPartEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getProperty_3079ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case UsageEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getUsage_4001ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case InterfaceRealizationEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getInterfaceRealization_4006ContainedLinks(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 SubstitutionEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getSubstitution_4012ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ManifestationEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getManifestation_4014ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ComponentRealizationEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComponentRealization_4007ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case AbstractionEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getAbstraction_4013ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DependencyEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4010ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DependencyBranchEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4017ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ConnectorEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getConnector_4019ContainedLinks(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.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
deleted file mode 100644
index 8d41cd8dd5b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,587 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelPackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelItemSemanticEditPolicy() {
- super(UMLElementTypes.Model_3202);
- }
-
- /**
- * @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 RectangleInterfaceEditPartCN.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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 ComponentEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 CommentEditPartPCN.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 ConstraintEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 InterfaceEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.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
deleted file mode 100644
index b033b172a80..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,587 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Model_3077);
- }
-
- /**
- * @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 RectangleInterfaceEditPartCN.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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 ComponentEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 CommentEditPartPCN.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 ConstraintEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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 InterfaceEditPartPCN.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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index 5be7372ebc2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,248 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-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.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.SetBoundsCommand;
-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.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-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;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.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
- .getModelPackagedelements_7006SemanticChildren(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 RectangleInterfaceEditPartCN.VISUAL_ID:
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case ComponentEditPartPCN.VISUAL_ID:
- case CommentEditPartPCN.VISUAL_ID:
- case ConstraintEditPartPCN.VISUAL_ID:
- case InterfaceEditPartPCN.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
- .getModelPackagedelements_7006SemanticChildren((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)
- HashMap<UMLNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<UMLNodeDescriptor, LinkedList<View>>();
- //
- // 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
- LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
- 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
- } else {
- potentialMatch.add(childView);
- }
- }
- }
- 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());
- } else if (potentialMatch.size() > 0) {
- potentialViews.put(next, potentialMatch);
- }
- }
- // 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);
- //
- CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(host().getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize);
- 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);
- LinkedList<View> possibleMatches = potentialViews.get(next);
- if (possibleMatches != null) {
- // from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
- possibleMatches.retainAll(knownViewChildren);
- }
- if (possibleMatches != null && !possibleMatches.isEmpty()) {
- View originalView = possibleMatches.getFirst();
- knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
- // add command to copy properties
- if (originalView instanceof Node) {
- if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
- Bounds b = (Bounds) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
- Location l = (Location) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Point(l.getX(), l.getY())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
- Size s = (Size) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Dimension(s.getWidth(), s.getHeight())));
- }
- }
- }
- }
-
- 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);
- if (boundsCommand.canExecute()) {
- executeCommand(new ICommandProxy(boundsCommand.reduce()));
- }
- @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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
deleted file mode 100644
index 87de05440d8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,248 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-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.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.SetBoundsCommand;
-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.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-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;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.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
- .getModelPackagedelements_7007SemanticChildren(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 RectangleInterfaceEditPartCN.VISUAL_ID:
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case ComponentEditPartPCN.VISUAL_ID:
- case CommentEditPartPCN.VISUAL_ID:
- case ConstraintEditPartPCN.VISUAL_ID:
- case InterfaceEditPartPCN.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
- .getModelPackagedelements_7007SemanticChildren((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)
- HashMap<UMLNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<UMLNodeDescriptor, LinkedList<View>>();
- //
- // 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
- LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
- 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
- } else {
- potentialMatch.add(childView);
- }
- }
- }
- 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());
- } else if (potentialMatch.size() > 0) {
- potentialViews.put(next, potentialMatch);
- }
- }
- // 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);
- //
- CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(host().getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize);
- 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);
- LinkedList<View> possibleMatches = potentialViews.get(next);
- if (possibleMatches != null) {
- // from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
- possibleMatches.retainAll(knownViewChildren);
- }
- if (possibleMatches != null && !possibleMatches.isEmpty()) {
- View originalView = possibleMatches.getFirst();
- knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
- // add command to copy properties
- if (originalView instanceof Node) {
- if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
- Bounds b = (Bounds) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
- Location l = (Location) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Point(l.getX(), l.getY())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
- Size s = (Size) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Dimension(s.getWidth(), s.getHeight())));
- }
- }
- }
- }
-
- 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);
- if (boundsCommand.canExecute()) {
- executeCommand(new ICommandProxy(boundsCommand.reduce()));
- }
- @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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index df6894fef17..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,87 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ModelCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PackageCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelPackageableElementCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Model_3202);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Interface_3078 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Model_3077 == requestElementType) {
-
- return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Package_3076 == requestElementType) {
-
- return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3071 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3074 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3075 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3072 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 6477afc7bc9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,87 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ModelCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PackageCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelPackageableElementCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Model_3077);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Interface_3078 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Model_3077 == requestElementType) {
-
- return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Package_3076 == requestElementType) {
-
- return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3071 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3074 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3075 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3072 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
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
deleted file mode 100644
index ec124f84e05..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,61 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OperationForInterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OperationForInterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Operation_5);
- }
-
- /**
- * @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());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicy.java
deleted file mode 100644
index cfdd5edd96e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_3200);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicyCN.java
deleted file mode 100644
index c78437eb405..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Package_3076);
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index ccade8f2334..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,248 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-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.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.SetBoundsCommand;
-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.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-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;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.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
- .getPackagePackagedelements_7002SemanticChildren(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 RectangleInterfaceEditPartCN.VISUAL_ID:
- case CommentEditPartPCN.VISUAL_ID:
- case ConstraintEditPartPCN.VISUAL_ID:
- case ComponentEditPartPCN.VISUAL_ID:
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case InterfaceEditPartPCN.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
- .getPackagePackagedelements_7002SemanticChildren((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)
- HashMap<UMLNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<UMLNodeDescriptor, LinkedList<View>>();
- //
- // 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
- LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
- 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
- } else {
- potentialMatch.add(childView);
- }
- }
- }
- 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());
- } else if (potentialMatch.size() > 0) {
- potentialViews.put(next, potentialMatch);
- }
- }
- // 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);
- //
- CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(host().getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize);
- 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);
- LinkedList<View> possibleMatches = potentialViews.get(next);
- if (possibleMatches != null) {
- // from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
- possibleMatches.retainAll(knownViewChildren);
- }
- if (possibleMatches != null && !possibleMatches.isEmpty()) {
- View originalView = possibleMatches.getFirst();
- knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
- // add command to copy properties
- if (originalView instanceof Node) {
- if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
- Bounds b = (Bounds) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
- Location l = (Location) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Point(l.getX(), l.getY())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
- Size s = (Size) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Dimension(s.getWidth(), s.getHeight())));
- }
- }
- }
- }
-
- 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);
- if (boundsCommand.canExecute()) {
- executeCommand(new ICommandProxy(boundsCommand.reduce()));
- }
- @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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
deleted file mode 100644
index 57a077d5074..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
+++ /dev/null
@@ -1,248 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-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.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.SetBoundsCommand;
-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.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-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;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.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
- .getPackagePackagedelements_7005SemanticChildren(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 RectangleInterfaceEditPartCN.VISUAL_ID:
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case ComponentEditPartPCN.VISUAL_ID:
- case CommentEditPartPCN.VISUAL_ID:
- case ConstraintEditPartPCN.VISUAL_ID:
- case InterfaceEditPartPCN.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
- .getPackagePackagedelements_7005SemanticChildren((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)
- HashMap<UMLNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<UMLNodeDescriptor, LinkedList<View>>();
- //
- // 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
- LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
- 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
- } else {
- potentialMatch.add(childView);
- }
- }
- }
- 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());
- } else if (potentialMatch.size() > 0) {
- potentialViews.put(next, potentialMatch);
- }
- }
- // 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);
- //
- CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(host().getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize);
- 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);
- LinkedList<View> possibleMatches = potentialViews.get(next);
- if (possibleMatches != null) {
- // from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
- possibleMatches.retainAll(knownViewChildren);
- }
- if (possibleMatches != null && !possibleMatches.isEmpty()) {
- View originalView = possibleMatches.getFirst();
- knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
- // add command to copy properties
- if (originalView instanceof Node) {
- if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
- Bounds b = (Bounds) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
- Location l = (Location) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Point(l.getX(), l.getY())));
- } else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
- Size s = (Size) ((Node) originalView).getLayoutConstraint();
- boundsCommand.add(new SetBoundsCommand(boundsCommand.getEditingDomain(), boundsCommand.getLabel(), descriptor, new Dimension(s.getWidth(), s.getHeight())));
- }
- }
- }
- }
-
- 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);
- if (boundsCommand.canExecute()) {
- executeCommand(new ICommandProxy(boundsCommand.reduce()));
- }
- @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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 779528f28f6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,87 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ModelCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PackageCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackagePackageableElementCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_3200);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Interface_3078 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3074 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3075 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3071 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Model_3077 == requestElementType) {
-
- return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Package_3076 == requestElementType) {
-
- return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3072 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index f9febb04db3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,87 +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.component.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceCreateCommandPCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ModelCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.PackageCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackagePackageableElementCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Package_3076);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Interface_3078 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Model_3077 == requestElementType) {
-
- return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Package_3076 == requestElementType) {
-
- return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3071 == requestElementType) {
-
- return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3074 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3075 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3072 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyCanonicalEditPolicy.java
deleted file mode 100644
index 45e0445166f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyCanonicalEditPolicy.java
+++ /dev/null
@@ -1,176 +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.component.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.component.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PropertyCanonicalEditPolicy 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.getStructuredClassifier_OwnedAttribute();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getProperty_3079SemanticChildren(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 PortEditPart.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
- .getProperty_3079SemanticChildren((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.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyForInterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyForInterfaceItemSemanticEditPolicy.java
deleted file mode 100644
index 1e0a8246adc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyForInterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,53 +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.component.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.requests.DestroyElementRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PropertyForInterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PropertyForInterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Property_1);
- }
-
- /**
- * @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;
- }
-}
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
deleted file mode 100644
index 9646828861b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,61 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ReceptionInInterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ReceptionInInterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Reception_6);
- }
-
- /**
- * @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());
- }
-}
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
deleted file mode 100644
index 10f2829cb4d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,429 +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.component.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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-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.InterfaceOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.OperationForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyForInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class RectangleInterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public RectangleInterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Interface_3205);
- }
-
- /**
- * @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 InterfaceAttributeCompartmentEditPart.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case PropertyForInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- }
- }
- break;
- case InterfaceOperationCompartmentEditPart.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case OperationForInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- case ReceptionInInterfaceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(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.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.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
deleted file mode 100644
index 541f7f3905d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,315 +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.component.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.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.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class SubstitutionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public SubstitutionItemSemanticEditPolicy() {
- super(UMLElementTypes.Substitution_4012);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- 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 EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- return getGEFWrapper(cmd.reduce());
- // return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- }
-
- /**
- * @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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.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 ccd620704ad..10affa686a6 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
@@ -47,7 +47,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipReques
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.component.expressions.UMLOCLFactory;
@@ -243,8 +242,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getCreateCommand(CreateElementRequest req) {
IElementType requestElementType = req.getElementType();
- if (requestElementType instanceof IExtendedHintedElementType) {
- // try to get a semantic create command from the extended type
+ if (requestElementType instanceof IElementType) {
IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
if (commandProvider != null) {
ICommand command = commandProvider.getEditCommand(req);
@@ -256,12 +254,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return null;
}
- // RS: add code for extended types
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -274,8 +270,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -288,8 +283,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -373,7 +367,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
+ return (cmd == null) ? UnexecutableCommand.INSTANCE : new ICommandProxy(cmd);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UsageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UsageItemSemanticEditPolicy.java
deleted file mode 100644
index 15c6889ead5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UsageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,313 +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.component.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.component.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UsageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public UsageItemSemanticEditPolicy() {
- super(UMLElementTypes.Usage_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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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.Usage_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4006 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Substitution_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4014 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4013 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.CommentAnnotatedElement_4015 == 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.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == 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 UsageEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case ComponentRealizationEditPart.VISUAL_ID:
- case AbstractionEditPart.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.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLElementTypes.java
index 30e0574d8c4..c1e38d58995 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLElementTypes.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLElementTypes.java
@@ -469,7 +469,17 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(Link_4018);
KNOWN_ELEMENT_TYPES.add(Connector_4019);
}
- return KNOWN_ELEMENT_TYPES.contains(elementType);
+
+ boolean result = KNOWN_ELEMENT_TYPES.contains(elementType);
+
+ if (!result) {
+ IElementType[] supertypes = elementType.getAllSuperTypes();
+ for (int i = 0; !result && (i < supertypes.length); i++) {
+ result = KNOWN_ELEMENT_TYPES.contains(supertypes[i]);
+ }
+ }
+
+ return result;
}
/**
@@ -584,4 +594,20 @@ public class UMLElementTypes {
return org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes.getElement(elementTypeAdapter);
}
};
+
+ /**
+ * @generated
+ */
+ public static boolean isKindOf(IElementType subtype, IElementType supertype) {
+ boolean result = subtype == supertype;
+
+ if (!result) {
+ IElementType[] supertypes = subtype.getAllSuperTypes();
+ for (int i = 0; !result && (i < supertypes.length); i++) {
+ result = supertype == supertypes[i];
+ }
+ }
+
+ return result;
+ }
}
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 fc7a6e9cc63..7b017ce8420 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
@@ -244,24 +244,18 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
} 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
- }
+
+ 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
- }
+ // if (domainElement != null && visualID != org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ // return false; // visual id for node EClass should match visual id from element type
+ // }
} else {
if (!ComponentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
return false; // foreign diagram
@@ -298,13 +292,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
}
}
}
- return DependencyNodeEditPart.VISUAL_ID == visualID || ComponentEditPart.VISUAL_ID == visualID || ModelEditPart.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || RectangleInterfaceEditPart.VISUAL_ID == visualID
- || CommentEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || DefaultNamedElementEditPart.VISUAL_ID == visualID || InterfaceEditPart.VISUAL_ID == visualID || PortEditPart.VISUAL_ID == visualID
- || ModelEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || RectangleInterfaceEditPartCN.VISUAL_ID == visualID || ComponentEditPartCN.VISUAL_ID == visualID || ComponentEditPartPCN.VISUAL_ID == visualID
- || CommentEditPartPCN.VISUAL_ID == visualID || ConstraintEditPartPCN.VISUAL_ID == visualID || PropertyForInterfaceEditPart.VISUAL_ID == visualID || OperationForInterfaceEditPart.VISUAL_ID == visualID
- || ReceptionInInterfaceEditPart.VISUAL_ID == visualID || InterfaceEditPartPCN.VISUAL_ID == visualID || PropertyPartEditPartCN.VISUAL_ID == visualID;
-
+ return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
/**
@@ -331,11 +320,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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
- }
+ // int visualID = org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry.getVisualID(elementTypeHint);
+ // org.eclipse.emf.ecore.EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ // if (domainElement != null && visualID != org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
+ // return false; // visual id for link EClass should match visual id from element type
+ // }
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
index f8a7c32fc0e..dee4ef9cf83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
@@ -7,7 +7,6 @@ Export-Package: org.eclipse.papyrus.uml.diagram.composite,
org.eclipse.papyrus.uml.diagram.composite.custom.helper,
org.eclipse.papyrus.uml.diagram.composite.custom.locators,
org.eclipse.papyrus.uml.diagram.composite.custom.parts,
- org.eclipse.papyrus.uml.diagram.composite.edit.commands,
org.eclipse.papyrus.uml.diagram.composite.edit.helpers,
org.eclipse.papyrus.uml.diagram.composite.edit.parts,
org.eclipse.papyrus.uml.diagram.composite.edit.policies,
@@ -20,7 +19,7 @@ Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.core.runtime,
org.eclipse.core.resources,
@@ -72,7 +71,8 @@ Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
org.eclipse.papyrus.uml.diagram.synchronizeview;bundle-version="1.1.0",
- org.eclipse.core.databinding.observable
+ org.eclipse.core.databinding.observable,
+ org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/build.properties
index c8d2b6f59e3..fa38cf7f5b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/build.properties
@@ -1,7 +1,15 @@
#
#Mon Sep 12 09:29:45 CEST 2011
output..=bin/
-bin.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,messages.properties,.options,about.html
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ messages.properties,\
+ .options,\
+ about.html,\
+ model/
jars.compile.order=.
src.includes = about.html
source..=src/,custom-src/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java
deleted file mode 100644
index 6ba138250b8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * 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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 410346
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.uml.diagram.composite.custom.messages.Messages;
-import org.eclipse.papyrus.uml.diagram.composite.custom.ui.CollaborationRoleValidator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.ConnectableElement;
-
-/**
- * <pre>
- * This class provides a custom creation command for CollaborationRole.
- * CollaborationRole are references toward any {@link ConnectableElement} in the model
- * (not necessarily owned by the {@link Collaboration}) graphically represented in
- * {@link Collaboration}.
- * </pre>
- */
-public class CollaborationRoleCreateCommand extends CollaborationRoleCreateCommandCN {
-
- /**
- * Constructor
- *
- * @param req
- * the creation request
- */
- public CollaborationRoleCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * <pre>
- * The method executes the creation :
- * - opens a selection dialog to choose a {@link ConnectableElement} to reference as a role
- * - add the selection in CollaborationRole eReference of the edited {@link Collaboration}.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- // Retrieve the edited Collaboration
- Collaboration owner = (Collaboration) getElementToEdit();
-
- // Create and open the selection dialog
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- Shell currentShell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(currentShell, new AdapterFactoryLabelProvider(adapterFactory), new AdapterFactoryContentProvider(adapterFactory));
-
- try {
- // Set dialog parameters
- dialog.setTitle(Messages.CollaborationRoleSelectionDialog_Title);
- dialog.setMessage(Messages.CollaborationRoleSelectionDialog_Message);
- dialog.setAllowMultiple(false);
- dialog.setHelpAvailable(false);
- // ConnectableElement from the whole model can be selected as role.
- dialog.setInput(owner.getModel());
- // CollaborationRoleValidator ensures that an the selected element is a ConnectableElement.
- dialog.setValidator(new CollaborationRoleValidator());
-
- dialog.open();
- } finally {
- adapterFactory.dispose();
- }
-
- // If a ConnectableElement has been selected, complete command execution
- // using selection as the "newly created" element and make the edited
- // Collaboration reference it in the CollaborationRoles eReference.
- if (dialog.getReturnCode() == Window.OK) {
- ConnectableElement role = (ConnectableElement) dialog.getFirstResult();
-
- owner.getCollaborationRoles().add(role);
-
- try {
- doConfigure(role, monitor, info);
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
- ((CreateElementRequest) getRequest()).setNewElement(role);
-
- return CommandResult.newOKCommandResult(role);
- }
-
- // No role selected: abort element creation
- return CommandResult.newCancelledCommandResult();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomConnectorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomConnectorCreateCommand.java
deleted file mode 100644
index 11371849af3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomConnectorCreateCommand.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-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.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-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.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.messages.Messages;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Connector;
-import org.eclipse.uml2.uml.ConnectorEnd;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * <pre>
- * This class is a custom creation command for Connector.
- *
- * Difficulties for Connector creation:
- * - differences between semantic (ConnectableEnd) graphical (ConnectableElement) ends of Connector
- * - requires to know not only the graphical end (Port, Property) but also the graphical parent in case of Port.
- *
- * The Connector source and target are declared as ConnectorEnd in the GMFGEN model to ensure correct validation,
- * but the real source and target are ConnectableElement.
- *
- * </pre>
- */
-public class CustomConnectorCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConnectorCreateCommand {
- /** Graphical parent of Source **/
- protected Property sourcePartWithPort = null;
- /** Graphical parent of Target **/
- protected Property targetPartWithPort = null;
- /** Graphical EditPart of Source **/
- protected GraphicalEditPart sourceGraphicalEditPart = null;
- /** Graphical EditPart of Target **/
- protected GraphicalEditPart targetGraphicalEditPart = null;
-
- /**
- * Constructor of Connector custom creation command
- *
- * @param req
- * the creation request
- * @param source
- * the connector source element
- * @param target
- * the connector target element
- */
- public CustomConnectorCreateCommand(CreateRelationshipRequest req, EObject source, EObject target) {
- super(req, source, target);
- // Resolve graphical parents of source and target store in request as Parameters
- // These parameters are added in request by (custom) GraphicalNodeEditPolicy
- if (req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_SOURCE_PARENT) instanceof Property) {
- sourcePartWithPort = (Property) req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_SOURCE_PARENT);
- }
- if (req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_TARGET_PARENT) instanceof Property) {
- targetPartWithPort = (Property) req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_TARGET_PARENT);
- }
- if (req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_SOURCE_GRAPHICAL) instanceof GraphicalEditPart) {
- sourceGraphicalEditPart = (GraphicalEditPart) req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_SOURCE_GRAPHICAL);
- }
- if (req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_TARGET_GRAPHICAL) instanceof GraphicalEditPart) {
- targetGraphicalEditPart = (GraphicalEditPart) req.getParameter(CustomGraphicalNodeEditPolicy.CONNECTOR_CREATE_REQUEST_TARGET_GRAPHICAL);
- }
- container = deduceContainer(_getSource(), _getTarget());
- }
-
- /**
- * Replaces the original getter which is cast as ConnectorEnd (expected end of Connector)
- *
- * @return the element that is graphically connected to Connector as source
- */
- protected ConnectableElement _getSource() {
- return (ConnectableElement) source;
- }
-
- /**
- * Replaces the original getter which is cast as ConnectorEnd (expected end of Connector)
- *
- * @return the element that is graphically connected to Connector as target
- */
- protected ConnectableElement _getTarget() {
- return (ConnectableElement) target;
- }
-
- /**
- * <pre>
- * Checks if the Connector can be created or not.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- public boolean canExecute() {
- if ((source == null) && (target == null)) {
- return false;
- }
- if ((source != null) && !(source instanceof ConnectableElement)) {
- return false;
- }
- if ((target != null) && !(target instanceof ConnectableElement)) {
- return false;
- }
- if (source == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- if ((target != null) && (getContainer() == null)) {
- return false;
- }
- // return
- // UMLBaseItemSemanticEditPolicy.LinkConstraints.canCreateConnector_4013(getContainer(),
- // _getSource(),
- // _getTarget());
- // this returns true anyway...
- return true;
- }
-
- /**
- * <pre>
- * Creates the new Connector.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException(Messages.ConnectorCreateCommand_INVALID_ARGS_MSG);
- }
- Connector newElement = UMLFactory.eINSTANCE.createConnector();
- getContainer().getOwnedConnectors().add(newElement);
- ConnectorEnd end0 = UMLFactory.eINSTANCE.createConnectorEnd();
- end0.setLower(1);
- end0.setUpper(1);
- if (_getSource() instanceof Port) {
- end0.setRole(_getSource());
- end0.setPartWithPort(sourcePartWithPort);
- } else if (_getSource() instanceof ConnectableElement) {
- end0.setRole(_getSource());
- } else {
- throw new ExecutionException(Messages.ConnectorCreateCommand_INVALID_SOURCE_MSG);
- }
- ConnectorEnd end1 = UMLFactory.eINSTANCE.createConnectorEnd();
- end1.setLower(1);
- end1.setUpper(1);
- if (_getTarget() instanceof Port) {
- end1.setRole(_getTarget());
- end1.setPartWithPort(targetPartWithPort);
- } else if (_getTarget() instanceof ConnectableElement) {
- end1.setRole(_getTarget());
- } else {
- throw new ExecutionException(Messages.ConnectorCreateCommand_INVALID_TARGET_MSG);
- }
- newElement.getEnds().add(end0);
- newElement.getEnds().add(end1);
- ElementInitializers.getInstance().init_Connector_4013(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * <pre>
- * This method is the exact copy of the inherited method, except that it uses the local getters
- * (_getSource(), _getTarget()).
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- 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());
- 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);
- }
- }
-
- /**
- *
- * Tries to find a common StructuredClassifier container to add the new Connector.
- *
- * @see org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConnectorCreateCommand#deduceContainer(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
- *
- * @param source
- * the source object
- * @param target
- * the target object
- * @return a common StructuredClassifier container (graphical search)
- */
- @Override
- protected StructuredClassifier deduceContainer(EObject source, EObject target) {
- if (sourceGraphicalEditPart != null && targetGraphicalEditPart != null) {
- StructuredClassifier containerProposedBySource = proposedContainer(sourceGraphicalEditPart);
- StructuredClassifier containerProposedByTarget = proposedContainer(targetGraphicalEditPart);
- StructuredClassifier deducedContainer = null;
- if ((containerProposedBySource != null) && (containerProposedByTarget != null)) {
- if (containerProposedBySource == containerProposedByTarget) {
- deducedContainer = containerProposedBySource;
- }
- }
- return deducedContainer;
- }
- return null;
- }
-
- /**
- * Parse graphical parent of the graphicalEditPart until a StructureClassifier is found.
- *
- * @param graphicalEditPart
- * the graphical edit part
- * @return null or a StructuredClassifier that graphically contains the graphicalEditPart
- */
- private StructuredClassifier proposedContainer(GraphicalEditPart graphicalEditPart) {
- for (EditPart ep = graphicalEditPart; ep != null; ep = ep.getParent()) {
- if (ep instanceof GraphicalEditPart) {
- GraphicalEditPart parent = (GraphicalEditPart) ep;
- EObject semanticParent = parent.resolveSemanticElement();
- if (semanticParent instanceof StructuredClassifier) {
- return (StructuredClassifier) semanticParent;
- }
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomInformationFlowCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomInformationFlowCreateCommand.java
deleted file mode 100644
index 352a9990bb5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomInformationFlowCreateCommand.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*****************************************************************************
- * 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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 410346
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-import java.util.ArrayList;
-
-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.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.uml.diagram.composite.custom.messages.Messages;
-import org.eclipse.papyrus.uml.diagram.composite.custom.ui.InformationItemElementTreeSelectionDialog;
-import org.eclipse.papyrus.uml.diagram.composite.custom.ui.InformationItemValidator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.ui.NameLabelValidator;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.InformationFlow;
-import org.eclipse.uml2.uml.InformationItem;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * <pre>
- * This class provides a custom creation command for InformationFlow
- * InformationFlow are references toward any {@link InformationItem} in the model
- * </pre>
- */
-public class CustomInformationFlowCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand {
-
- public CustomInformationFlowCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
-
- }
-
- /**
- * <pre>
- * The method executes the creation :
- * - opens a selection dialog to choose {@link InformationItem} or {@link Classifier} reference as a convoyed Classifier
- * by the {@link InformationFlow} type
- * - create the InformationFlow between the source and the target
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- // Create and open the selection dialog
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- Shell currentShell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- InformationItemElementTreeSelectionDialog dialog = new InformationItemElementTreeSelectionDialog(currentShell, new AdapterFactoryLabelProvider(adapterFactory), new AdapterFactoryContentProvider(adapterFactory));
-
- try {
- // Set dialog parameters
- dialog.setTitle(Messages.InformationFlowSelectionDialog_Title);
- dialog.setMessage(Messages.InformationFlowSelectionDialog_Message);
- dialog.setAllowMultiple(true);
- dialog.setHelpAvailable(false);
- dialog.setInput(getSource().getModel());
- dialog.setValidator(new InformationItemValidator());
-
- ArrayList<Classifier> initialSelection = new ArrayList<Classifier>();
-
- // here the dialog.getReturnCode is IDialogConstants.OK_ID
- while (dialog.open() != IDialogConstants.CANCEL_ID) {
-
- /*
- * If classifiers have been selected, complete command execution and write the selection
- * in the conveyed:Classifief Association
- */
- if (dialog.getReturnCode() == Window.OK) {
- Object[] conveyedClassified = dialog.getResult();
-
- InformationFlow newInformationFlow = UMLFactory.eINSTANCE.createInformationFlow();
- getContainer().getPackagedElements().add(newInformationFlow);
- newInformationFlow.getInformationSources().add(getSource());
- newInformationFlow.getInformationTargets().add(getTarget());
-
- // add the classifier in the list of conveyed Classifier
- for (int i = 0; i < conveyedClassified.length; i++) {
- newInformationFlow.getConveyeds().add((Classifier) conveyedClassified[i]);
- }
-
- ElementInitializers.getInstance().init_InformationFlow_4021(newInformationFlow);
-
- ((CreateElementRequest) getRequest()).setNewElement(newInformationFlow);
- return CommandResult.newOKCommandResult(newInformationFlow);
-
- } else if (dialog.getReturnCode() == InformationItemElementTreeSelectionDialog.newInformationItemButton_ID) {
- // create a new InformationItem
- initialSelection.add(createNewInformationItem());
- dialog.setInitialElementSelections(initialSelection);
- }
- }// end of while()
- } finally {
- adapterFactory.dispose();
- }
-
- // No Classifier selected: abort element creation
- return CommandResult.newCancelledCommandResult();
- }
-
- /**
- * - Create a new {@link InformationItem}
- *
- * - Ask for the {@link InformationItem}'s name
- *
- * @return the new InformationItem or null if canceled
- */
-
- // TODO should be moved?
- private InformationItem createNewInformationItem() {
- // create the new InformationItem
- InformationItem infoItem = UMLFactory.eINSTANCE.createInformationItem();
- getContainer().getPackagedElements().add(infoItem);
- ElementInitializers.getInstance().init_InformationItem_2080(infoItem);
-
- // ask for the name of the new InformationItem
- // Create the editor
- Shell currentShell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- IDirectEditorConfiguration configuration;// = new DefaultDirectEditorConfiguration();
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + infoItem.eClass().getInstanceClassName());
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, infoItem.eClass().getInstanceClassName());
- configuration.preEditAction(infoItem);
- configuration.setInputValidator(new NameLabelValidator(Messages.InformationItemGetNameDialog_Error_Message));
- ExtendedDirectEditionDialog dialog = new ExtendedDirectEditionDialog(currentShell, infoItem, infoItem.getName(), configuration);
-
- dialog.open();
-
- if (dialog.getReturnCode() == Window.CANCEL) {
- // We delete the newInformationItem
- int index = getContainer().getPackagedElements().indexOf(infoItem);
- getContainer().getPackagedElements().remove(index);
- return null;
- } else {
- infoItem.setName(dialog.getValue());
- ((CreateElementRequest) getRequest()).setNewElement(infoItem);
- return infoItem;
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomPortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomPortCreateCommand.java
deleted file mode 100644
index a57d8079e7b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomPortCreateCommand.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * Port creation command used to create Port on a Property (no direct containment link between
- * Property and Port).
- *
- */
-public class CustomPortCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand {
-
- /** Constructor **/
- public CustomPortCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * <pre>
- * Checks if the Port can be created on the Property.
- * The Property must be typed by a StructuredClassifier (in other words, an element that
- * can own Port). The new Port is owned be the type of the Property.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- public boolean canExecute() {
- Property target = (Property) getElementToEdit();
-
- if ((target.getType() != null) && (target.getType() instanceof StructuredClassifier)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * <pre>
- * Custom creation of the Port :
- * - resolve the Property type
- * - add a new Port on this type.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Port newElement = UMLFactory.eINSTANCE.createPort();
-
- StructuredClassifier owner = (StructuredClassifier) ((Property) getElementToEdit()).getType();
- owner.getOwnedAttributes().add(newElement);
-
- ElementInitializers.getInstance().init_Port_3069(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomRoleBindingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomRoleBindingCreateCommand.java
deleted file mode 100644
index 44b7f7d95b3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CustomRoleBindingCreateCommand.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*****************************************************************************
- * 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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 410346
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-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.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.uml.diagram.composite.custom.messages.Messages;
-import org.eclipse.papyrus.uml.diagram.composite.custom.ui.CollaborationRoleTreeContentProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.uml2.uml.CollaborationUse;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * <pre>
- * This class provides a custom creation command for RoleBinding between {@link CollaborationUse} and
- * {@link ConnectableElement}.
- * </pre>
- */
-public class CustomRoleBindingCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand {
-
- /**
- * Constructor
- *
- * @param request
- * the relationship creation request
- * @param source
- * element used as source of the new relationship
- * @param target
- * element used as target of the new relationship
- */
- public CustomRoleBindingCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * <pre>
- * The method executes the creation :
- * - opens a selection dialog to choose a {@link ConnectableElement} reference as a role by the {@link CollaborationUse} type
- * - created a dependency between the selected role and the {@link ConnectableElement} that will be bind to it
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- if (!canExecute()) {
- throw new ExecutionException(Messages.RoleBindingCreateCommand_INVALID_ARGS_MSG);
- }
-
- // Retrieve the graphical source of the binding.
- // This differs from the semantic source of the binding which is a role of the
- // CollaborationUse type.
- CollaborationUse graphicalSource = (CollaborationUse) getSource();
-
- // Create and open the selection dialog
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- Shell currentShell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(currentShell, new AdapterFactoryLabelProvider(adapterFactory), new CollaborationRoleTreeContentProvider());
-
- try {
- // Set dialog parameters
- dialog.setTitle(Messages.RoleBindingRoleSelectionDialog_Title);
- dialog.setMessage(Messages.RoleBindingRoleSelectionDialog_Message);
- dialog.setAllowMultiple(false);
- dialog.setHelpAvailable(false);
- // The source CollaborationUse is set as input for the selection dialog,
- // the CollaborationRoleTreeContentProvider provides the roles that can possibly be
- // selected.
- dialog.setInput(graphicalSource);
-
- dialog.open();
- } finally {
- adapterFactory.dispose();
- }
-
- // If a ConnectableElement has been selected, complete command execution
- // using selection as the "newly created" element and make the edited
- // Collaboration reference it in the CollaborationRoles eReference.
- if (dialog.getReturnCode() == Window.OK) {
-
- ConnectableElement roleToBind = (ConnectableElement) dialog.getFirstResult();
- // Create a Dependency (the binding) between selected role and a ConnectableElement
- // (the target)
- Dependency newBinding = UMLFactory.eINSTANCE.createDependency();
- getContainer().getPackagedElements().add(newBinding);
- newBinding.getClients().add(roleToBind);
- newBinding.setName("binding_" + roleToBind.getName() + "_" + getTarget().getName());
- newBinding.getSuppliers().add(getTarget());
- graphicalSource.getRoleBindings().add(newBinding);
-
- doConfigure(newBinding, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newBinding);
-
- return CommandResult.newOKCommandResult(newBinding);
- }
-
- // No role selected: abort element creation
- return CommandResult.newCancelledCommandResult();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java
deleted file mode 100644
index 89e7ffdc142..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-
-public class PropertyPartCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN {
-
- /** Constructor **/
- public PropertyPartCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * <pre>
- * Checks if the Property can be created on the Property (means appearing graphically on the property).
- * The Property must be typed by a StructuredClassifier (in other words, an element that
- * can own Property). The new Property is owned be the type of the Property.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- public boolean canExecute() {
- Property target = (Property) getElementToEdit();
-
- if ((target.getType() != null) && (target.getType() instanceof StructuredClassifier)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * <pre>
- * Custom creation of the Property type :
- * - resolve the Property type
- * - add a new Property on this type.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- StructuredClassifier owner = (StructuredClassifier) ((Property) getElementToEdit()).getType();
- owner.getOwnedAttributes().add(newElement);
-
- ElementInitializers.getInstance().init_Property_3070(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationRoleItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationRoleItemSemanticEditPolicy.java
index f864a17c62a..9660fba892d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationRoleItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationRoleItemSemanticEditPolicy.java
@@ -20,9 +20,9 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationRoleItemSemanticEditPolicyCN;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.UMLPackage;
@@ -32,7 +32,7 @@ import org.eclipse.uml2.uml.UMLPackage;
* generated for the CollaborationUse element (when used in CompositeStructure Diagram)
* </pre>
*/
-public class CollaborationRoleItemSemanticEditPolicy extends CollaborationRoleItemSemanticEditPolicyCN {
+public class CollaborationRoleItemSemanticEditPolicy extends DefaultSemanticEditPolicy {
/**
* <pre>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 1c4c9ef407f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CollaborationRoleCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the Collaboration element (when used in CompositeStructure Diagram)
- * </pre>
- */
-public class CustomCollaborationCompositeCompartmentItemSemanticEditPolicy extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationCompositeCompartmentItemSemanticEditPolicy {
-
- /**
- * <pre>
- * Calls a custom creation command to allow the correct creation of a
- * role on the Collaboration.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.ConnectableElement_3115 == req.getElementType()) {
- return getGEFWrapper(new CollaborationRoleCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationUseItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationUseItemSemanticEditPolicyCN.java
deleted file mode 100644
index b91e95a8400..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomCollaborationUseItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomRoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the CollaborationUse element (when used in CompositeStructure Diagram)
- * </pre>
- */
-public class CustomCollaborationUseItemSemanticEditPolicyCN extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationUseItemSemanticEditPolicyCN {
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a RoleBinding linked
- * to a ConnectableElement.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getStartCreateRelationshipCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a RoleBinding linked
- * to a ConnectableElement.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomGraphicalNodeEditPolicy.java
deleted file mode 100644
index 54a8848524a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-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.commands.SemanticCreateCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomInformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the GRAPHICAL_NODE_ROLE
- * for the Port and Property elements (when used in CompositeStructure Diagram).
- *
- * The reason for this is that the creation of Connector requires not only to know
- * the ConnectableElement(s) on both end (given in CreateRelationshipRequest
- * Source and Target), but also the Property graphically owning the Port used at
- * ConnectorEnd.
- * </pre>
- */
-public class CustomGraphicalNodeEditPolicy extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy {
-
- /**
- * The ID for the additional parameter SOURCE_PARENT used in creation request
- */
- public static final String CONNECTOR_CREATE_REQUEST_SOURCE_PARENT = "SOURCE_PARENT"; //$NON-NLS-1$
-
- /**
- * The ID for the additional parameter TARGET_PARENT used in creation request
- */
- public static final String CONNECTOR_CREATE_REQUEST_TARGET_PARENT = "TARGET_PARENT"; //$NON-NLS-1$
-
- /**
- * The ID for the additional parameter SOURCE_GRAPHICAL used in creation request
- */
- public static final String CONNECTOR_CREATE_REQUEST_SOURCE_GRAPHICAL = "SOURCE_GRAPHICAL"; //$NON-NLS-1$
-
- /**
- * The ID for the additional parameter TARGET_GRAPHICAL used in creation request
- */
- public static final String CONNECTOR_CREATE_REQUEST_TARGET_GRAPHICAL = "TARGET_GRAPHICAL"; //$NON-NLS-1$
-
- /**
- * <pre>
- * This method is overridden in order to add information (graphical parent of Port)
- * in the CreationRelationshipRequest.
- *
- * These information is stored in the request as Parameters under the following keys:
- * - &quot;SOURCE_PARENT&quot; : UML Element used as Graphical parent of the source Port (end of Connector)
- * - &quot;TARGET_PARENT&quot; : UML Element used as Graphical parent of the target Port (end of Connector)
- * - &quot;SOURCE_GRAPHICAL&quot; : GraphicalEditPart of the source
- * - &quot;TARGET_GRAPHICAL&quot; : GraphicalEditPart of the target
- *
- * This method is used too to call the custom command for InformationFlow creation.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
- // return super.getConnectionAndRelationshipCompleteCommand(request);
-
- // get the element descriptor
- CreateElementRequestAdapter requestAdapter = request.getConnectionViewAndElementDescriptor().getCreateElementRequestAdapter();
- // get the semantic request
- CreateRelationshipRequest createElementRequest = (CreateRelationshipRequest) requestAdapter.getAdapter(CreateRelationshipRequest.class);
-
- createElementRequest.setPrompt(!request.isUISupressed());
-
- // complete the semantic request by filling in the source and
- // destination
- INodeEditPart targetEP = getConnectionCompleteEditPart(request);
- View sourceView = (View) request.getSourceEditPart().getModel();
- View targetView = (View) targetEP.getModel();
-
- // resolve the source
- EObject source = ViewUtil.resolveSemanticElement(sourceView);
- if (source == null) {
- source = sourceView;
- }
-
- // resolve the source parent (meaning graphical parent here)
- View sourceParentView = (request.getSourceEditPart() instanceof ConnectionEditPart) ? null : (View) request.getSourceEditPart().getParent().getModel();
- EObject sourceParent = (sourceParentView != null) ? ViewUtil.resolveSemanticElement(sourceParentView) : null;
- if (sourceParent == null) {
- sourceParent = sourceParentView;
- }
-
- createElementRequest.setParameter(CONNECTOR_CREATE_REQUEST_SOURCE_PARENT, sourceParent);
- createElementRequest.setParameter(CONNECTOR_CREATE_REQUEST_SOURCE_GRAPHICAL, request.getSourceEditPart());
- createElementRequest.setSource(source);
-
- // resolve the target
- EObject target = ViewUtil.resolveSemanticElement(targetView);
- if (target == null) {
- target = targetView;
- }
-
- // resolve the source parent (meaning graphical parent here)
- View targetParentView = (request.getTargetEditPart() instanceof ConnectionEditPart) ? null : (View) request.getTargetEditPart().getParent().getModel();
- EObject targetParent = (targetParentView != null) ? ViewUtil.resolveSemanticElement(targetParentView) : null;
- if (targetParent == null) {
- targetParent = targetParentView;
- }
-
- createElementRequest.setParameter(CONNECTOR_CREATE_REQUEST_TARGET_PARENT, targetParent);
- createElementRequest.setParameter(CONNECTOR_CREATE_REQUEST_TARGET_GRAPHICAL, request.getTargetEditPart());
- createElementRequest.setTarget(target);
-
- Command createElementCommand = null;
-
- // we have a custom command for the InformationFlow
- if (request.getConnectionViewDescriptor().getSemanticHint().equals((((IHintedType) UMLElementTypes.InformationFlow_4021).getSemanticHint()))) {
-
- createElementCommand = new ICommandProxy(new CustomInformationFlowCreateCommand(createElementRequest, source, target));
-
- } else {
- // get the create element request based on the elementdescriptor's
- // request
- createElementCommand = targetEP.getCommand(new EditCommandRequestWrapper((CreateRelationshipRequest) requestAdapter.getAdapter(CreateRelationshipRequest.class), request.getExtendedData()));
-
- }
-
- // create the create semantic element wrapper command
- if (null == createElementCommand) {
- return null;
- }
-
- SemanticCreateCommand semanticCommand = new SemanticCreateCommand(requestAdapter, createElementCommand);
- // get the view command
- Command viewCommand = getConnectionCompleteCommand(request);
- if (null == viewCommand) {
- return null;
- }
- // form the compound command and return
- CompositeCommand cc = new CompositeCommand(semanticCommand.getLabel());
- cc.compose(semanticCommand);
- cc.compose(new CommandProxy(viewCommand));
- return new ICommandProxy(cc);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomParameterItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomParameterItemSemanticEditPolicy.java
deleted file mode 100644
index 5adf6405621..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomParameterItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
-
-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.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomConnectorCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the Parameter element (when used in CompositeStructure Diagram)
- * </pre>
- */
-public class CustomParameterItemSemanticEditPolicy extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.ParameterItemSemanticEditPolicy {
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Parameter
- * on its source end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new RoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getStartCreateRelationshipCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Parameter
- * on its target end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new RoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case ConnectorEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Add graphical new end View in request parameters
- View targetView = (View) getHost().getModel();
- req.setParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, targetView);
-
- // 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);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPortItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPortItemSemanticEditPolicy.java
deleted file mode 100644
index ec7588971b0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPortItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.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.editparts.GraphicalEditPart;
-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.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomConnectorCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomRoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the Port element (when used in CompositeStructure Diagram)
- * </pre>
- */
-public class CustomPortItemSemanticEditPolicy extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.PortItemSemanticEditPolicy {
-
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case ConnectorEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Add graphical new end View in request parameters
- View targetView = (View) getHost().getModel();
- req.setParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, targetView);
-
- // 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);
- }
-
- /**
- * <pre>
- * Forbid direct destruction of Port in case the graphical parent is not
- * the semantic parent.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
-
- EObject graphicalParent = ((GraphicalEditPart) getHost().getParent()).resolveSemanticElement();
- EObject semanticParent = req.getElementToDestroy().eContainer();
-
- if (graphicalParent != semanticParent) {
- return UnexecutableCommand.INSTANCE;
- }
-
- return super.getDestroyElementCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Port
- * on its source end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), null));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getStartCreateRelationshipCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Port
- * on its target end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index c008da34468..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.PropertyPartCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the PropertyPartCompartment element (when used in CompositeStructure Diagram)
- * </pre>
- */
-public class CustomPropertyPartCompartmentItemSemanticEditPolicyCN extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.PropertyPartCompartmentItemSemanticEditPolicyCN {
-
- /**
- * <pre>
- * Calls a custom creation command that allow the creation of a Property
- * on an existing Property.
- * Semantically the Property is created owned by the type the edited Property.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.Property_3070 == req.getElementType()) {
- return getGEFWrapper(new PropertyPartCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartItemSemanticEditPolicyCN.java
deleted file mode 100644
index aff19ca71b4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomPropertyPartItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.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.editparts.GraphicalEditPart;
-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.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomConnectorCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomPortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CustomRoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * <pre>
- * This class provides a custom edit policy used to replace the SEMANTIC_ROLE
- * generated for the Property element (when used as Composite Part)
- *
- * TODO : This should probably also manage Port clean removal (semantic deletion causes issues)
- * </pre>
- */
-public class CustomPropertyPartItemSemanticEditPolicyCN extends org.eclipse.papyrus.uml.diagram.composite.edit.policies.PropertyPartItemSemanticEditPolicyCN {
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Port on a Property.
- * The Property has to be typed by a StructuredClassifier.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.Port_3069 == req.getElementType()) {
- return getGEFWrapper(new CustomPortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * <pre>
- * Forbid direct destruction of Property in case the graphical parent is not
- * the semantic parent.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
-
- EObject graphicalParent = ((GraphicalEditPart) getHost().getParent()).resolveSemanticElement();
- EObject semanticParent = req.getElementToDestroy().eContainer();
-
- if (graphicalParent != semanticParent) {
- return UnexecutableCommand.INSTANCE;
- }
-
- return super.getDestroyElementCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Property
- * on its source end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getStartCreateRelationshipCommand(req);
- }
-
- /**
- * <pre>
- * Calls a custom creation command to allow the creation of a Connector connected to a Property
- * on its target end.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Connector_4013 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectorCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == req.getElementType()) {
- return getGEFWrapper(new CustomRoleBindingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case ConnectorEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Add graphical new end View in request parameters
- View targetView = (View) getHost().getModel();
- req.setParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, targetView);
-
- // 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);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PortInCompartmentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PortInCompartmentCreationEditPolicy.java
index 725433086e1..61d824a0c3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PortInCompartmentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PortInCompartmentCreationEditPolicy.java
@@ -22,9 +22,9 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gef.requests.ChangeBoundsRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.edit.parts.BehaviorPortEditPart;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -33,7 +33,7 @@ import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
* a Port or Parameter is created in a Compartment. In such a case the Port (Parameter) should be added to the compartment owner.
*
*/
-public class PortInCompartmentCreationEditPolicy extends CreationEditPolicy {
+public class PortInCompartmentCreationEditPolicy extends DefaultCreationEditPolicy {
@Override
public EditPart getTargetEditPart(Request request) {
if (request instanceof CreateUnspecifiedTypeRequest) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/ui/CollaborationRoleValidator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/ui/CollaborationRoleValidator.java
deleted file mode 100644
index 6a3f2eaf1a0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/ui/CollaborationRoleValidator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite.custom.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.uml2.uml.ConnectableElement;
-
-/**
- * This SelectionStatusValidator validate the selected object. It is assumed here the the selection
- * does not allow multiple elements.
- *
- */
-public class CollaborationRoleValidator implements ISelectionStatusValidator {
-
- /**
- * <pre>
- * The selection has to be a {@link ConnectableElement} for validation.
- *
- * {@inheritDoc}
- * </pre>
- */
- @Override
- public IStatus validate(Object[] selection) {
-
- IStatus status = new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, "No selection found.");
-
- if (selection.length == 1) {
- if (selection[0] instanceof ConnectableElement) {
- status = new Status(IStatus.OK, UMLDiagramEditorPlugin.ID, "Selection validated.");
- } else {
- status = new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, "Selection has to be a ConnectableElement.");
- }
- }
- return status;
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties
index c6246756e48..81d8f82bb79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties
@@ -142,3 +142,9 @@ CommandName_OpenDiagram=Open Diagram
MessageFormatParser_InvalidInputError=Invalid input at {0}
UMLModelingAssistantProviderTitle=Select domain model element
UMLModelingAssistantProviderMessage=Available domain model elements:
+ManifestationCreationTool_title=Manifestation
+ManifestationCreationTool_desc=Create new Manifestation
+DeploymentCreationTool_title=Deployment
+DeploymentCreationTool_desc=Create new Deployment
+StringExpressionCreationTool_title=StringExpression
+StringExpressionCreationTool_desc=Create new StringExpression
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram-notation.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram-notation.elementtypesconfigurations
new file mode 100644
index 00000000000..0e567bd53b8
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram-notation.elementtypesconfigurations
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ASCII"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmi:id="_tT4HoLazEeSbnofizoRSMQ" metamodelNsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_tT4HobazEeSbnofizoRSMQ" name="Undefined" identifier="org.eclipse.papyrus.uml.diagram.composite.Node_3121" hint="3121" kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_tT5VwLazEeSbnofizoRSMQ" name="Undefined" identifier="org.eclipse.papyrus.uml.diagram.composite.Link_4022" hint="4022" kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_tT5VwbazEeSbnofizoRSMQ" name="Undefined" identifier="org.eclipse.papyrus.uml.diagram.composite.Link_4001" hint="4001" kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.elementtypesconfigurations
new file mode 100644
index 00000000000..c906ff16b01
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.elementtypesconfigurations
@@ -0,0 +1,1268 @@
+<?xml version="1.0" encoding="ASCII"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0"
+ xmi:id="_tL86sLazEeSbnofizoRSMQ"
+ name="CompositeStructure"
+ metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTshcLazEeSbnofizoRSMQ"
+ name="Abstraction"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_tTshcbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSdyYLazEeSbnofizoRSMQ"
+ name="Activity"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Activity_3072"
+ hint="3072">
+ <iconEntry
+ xmi:id="_tSdyYbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Activity.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Activity</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTAk8LazEeSbnofizoRSMQ"
+ name="Activity"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Activity_2060"
+ hint="2060">
+ <iconEntry
+ xmi:id="_tTAk8bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Activity.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Activity</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSzwoLazEeSbnofizoRSMQ"
+ name="Actor"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Actor_3091"
+ hint="3091">
+ <iconEntry
+ xmi:id="_tSzwobazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Actor.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Actor</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTMyMLazEeSbnofizoRSMQ"
+ name="Actor"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Actor_2077"
+ hint="2077">
+ <iconEntry
+ xmi:id="_tTMyMbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Actor.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Actor</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTSRwLazEeSbnofizoRSMQ"
+ name="Any Receive Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.AnyReceiveEvent_2085"
+ hint="2085">
+ <iconEntry
+ xmi:id="_tTSRwbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/AnyReceiveEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.AnyReceiveEvent</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS0-wLazEeSbnofizoRSMQ"
+ name="Artifact"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Artifact_3093"
+ hint="3093">
+ <iconEntry
+ xmi:id="_tS0-wbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Artifact.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Artifact</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTOAULazEeSbnofizoRSMQ"
+ name="Artifact"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Artifact_2079"
+ hint="2079">
+ <iconEntry
+ xmi:id="_tTOAUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Artifact.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Artifact</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTRqsLazEeSbnofizoRSMQ"
+ name="Call Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.CallEvent_2084"
+ hint="2084">
+ <iconEntry
+ xmi:id="_tTRqsbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/CallEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.CallEvent</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTS40LazEeSbnofizoRSMQ"
+ name="Change Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088"
+ hint="2088">
+ <iconEntry
+ xmi:id="_tTS40bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ChangeEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ChangeEvent</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tStqALazEeSbnofizoRSMQ"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Class_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_tStqAbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTH5sLazEeSbnofizoRSMQ"
+ name="Class"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Class_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_tTH5sbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSu4ILazEeSbnofizoRSMQ"
+ name="Collaboration"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Collaboration_3086"
+ hint="3086">
+ <iconEntry
+ xmi:id="_tSu4IbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Collaboration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Collaboration</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTJH0LazEeSbnofizoRSMQ"
+ name="Collaboration"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Collaboration_2075"
+ hint="2075">
+ <iconEntry
+ xmi:id="_tTJH0bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Collaboration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Collaboration</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSZg8LazEeSbnofizoRSMQ"
+ name="Collaboration Role"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.CollaborationRole_3115"
+ hint="3115">
+ <iconEntry
+ xmi:id="_tSZg8bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ConnectableElement.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Collaboration.CollaborationRole</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSb9MLazEeSbnofizoRSMQ"
+ name="Collaboration Use"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.CollaborationUse_3071"
+ hint="3071">
+ <iconEntry
+ xmi:id="_tSb9MbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/CollaborationUse.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.CollaborationUse</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS4pILazEeSbnofizoRSMQ"
+ name="Comment"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"
+ hint="3097">
+ <iconEntry
+ xmi:id="_tS4pIbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTj-kLazEeSbnofizoRSMQ"
+ name="Comment"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"
+ hint="2109">
+ <iconEntry
+ xmi:id="_tTj-kbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tToQALazEeSbnofizoRSMQ"
+ name="Comment Annotated Element"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"
+ hint="4002">
+ <specializedTypesID>org.eclipse.papyrus.uml.Comment.AnnotatedElements</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSmVQLazEeSbnofizoRSMQ"
+ name="Component"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Component_3081"
+ hint="3081">
+ <iconEntry
+ xmi:id="_tSmVQbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Component.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTE2YLazEeSbnofizoRSMQ"
+ name="Component"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Component_2069"
+ hint="2069">
+ <iconEntry
+ xmi:id="_tTE2YbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Component.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTo3ELazEeSbnofizoRSMQ"
+ name="Component Realization"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ComponentRealization_4004"
+ hint="4004">
+ <iconEntry
+ xmi:id="_tTo3EbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ComponentRealization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ComponentRealization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTwL0LazEeSbnofizoRSMQ"
+ name="Connector"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Connector_4013"
+ hint="4013">
+ <iconEntry
+ xmi:id="_tTwL0bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Connector.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Connector</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS9hoLazEeSbnofizoRSMQ"
+ name="Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"
+ hint="3120">
+ <iconEntry
+ xmi:id="_tS9hobazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Constraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTnB4LazEeSbnofizoRSMQ"
+ name="Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"
+ hint="2114">
+ <iconEntry
+ xmi:id="_tTnB4bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Constraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tToQAbazEeSbnofizoRSMQ"
+ name="Constraint Constrained Element"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"
+ hint="4003">
+ <specializedTypesID>org.eclipse.papyrus.uml.Constraint.ConstrainedElements</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSzJkLazEeSbnofizoRSMQ"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DataType_3080"
+ hint="3080">
+ <iconEntry
+ xmi:id="_tSzJkbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTMLILazEeSbnofizoRSMQ"
+ name="Data Type"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DataType_2068"
+ hint="2068">
+ <iconEntry
+ xmi:id="_tTMLIbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTvkwLazEeSbnofizoRSMQ"
+ name="Dependency"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Dependency_4010"
+ hint="4010">
+ <iconEntry
+ xmi:id="_tTvkwbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTtvkLazEeSbnofizoRSMQ"
+ name="Deployment"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Deployment_4009"
+ hint="4009">
+ <iconEntry
+ xmi:id="_tTtvkbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Deployment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Deployment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS0XsLazEeSbnofizoRSMQ"
+ name="Deployment Specification"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_3092"
+ hint="3092">
+ <iconEntry
+ xmi:id="_tS0XsbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DeploymentSpecification.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DeploymentSpecification</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTNZQLazEeSbnofizoRSMQ"
+ name="Deployment Specification"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_2078"
+ hint="2078">
+ <iconEntry
+ xmi:id="_tTNZQbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DeploymentSpecification.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DeploymentSpecification</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSnjYLazEeSbnofizoRSMQ"
+ name="Device"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Device_3082"
+ hint="3082">
+ <iconEntry
+ xmi:id="_tSnjYbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Device.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Device</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTGEgLazEeSbnofizoRSMQ"
+ name="Device"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Device_2070"
+ hint="2070">
+ <iconEntry
+ xmi:id="_tTGEgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Device.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Device</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTftILazEeSbnofizoRSMQ"
+ name="Duration"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Duration_2104"
+ hint="2104">
+ <iconEntry
+ xmi:id="_tTftIbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Duration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Duration</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS5QMLazEeSbnofizoRSMQ"
+ name="Duration Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_3116"
+ hint="3116">
+ <iconEntry
+ xmi:id="_tS5QMbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DurationConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DurationConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTkloLazEeSbnofizoRSMQ"
+ name="Duration Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_2110"
+ hint="2110">
+ <iconEntry
+ xmi:id="_tTklobazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DurationConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DurationConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tThiULazEeSbnofizoRSMQ"
+ name="Duration Interval"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DurationInterval_2106"
+ hint="2106">
+ <iconEntry
+ xmi:id="_tThiUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DurationInterval.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DurationInterval</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTVVELazEeSbnofizoRSMQ"
+ name="Duration Observation"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DurationObservation_2093"
+ hint="2093">
+ <iconEntry
+ xmi:id="_tTVVEbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/DurationObservation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.DurationObservation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tT2ScLazEeSbnofizoRSMQ"
+ name="Duration Observation Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.DurationObservationEvent_4019"
+ hint="4019">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSyigLazEeSbnofizoRSMQ"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Enumeration_3079"
+ hint="3079">
+ <iconEntry
+ xmi:id="_tSyigbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTK9ALazEeSbnofizoRSMQ"
+ name="Enumeration"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Enumeration_2067"
+ hint="2067">
+ <iconEntry
+ xmi:id="_tTK9AbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Enumeration.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Enumeration</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS_94LazEeSbnofizoRSMQ"
+ name="Enumeration Literal"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.EnumerationLiteral_3066"
+ hint="3066">
+ <iconEntry
+ xmi:id="_tS_94bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/EnumerationLiteral.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.EnumerationLiteral</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSoxgLazEeSbnofizoRSMQ"
+ name="Execution Environment"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_3083"
+ hint="3083">
+ <iconEntry
+ xmi:id="_tSoxgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ExecutionEnvironment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ExecutionEnvironment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTGrkLazEeSbnofizoRSMQ"
+ name="Execution Environment"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_2071"
+ hint="2071">
+ <iconEntry
+ xmi:id="_tTGrkbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ExecutionEnvironment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ExecutionEnvironment</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTfGELazEeSbnofizoRSMQ"
+ name="Expression"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Expression_2103"
+ hint="2103">
+ <iconEntry
+ xmi:id="_tTfGEbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Expression.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Expression</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSjR8LazEeSbnofizoRSMQ"
+ name="Function Behavior"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_3076"
+ hint="3076">
+ <iconEntry
+ xmi:id="_tSjR8bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/FunctionBehavior.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.FunctionBehavior</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTDoQLazEeSbnofizoRSMQ"
+ name="Function Behavior"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_2064"
+ hint="2064">
+ <iconEntry
+ xmi:id="_tTDoQbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/FunctionBehavior.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.FunctionBehavior</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tT1EULazEeSbnofizoRSMQ"
+ name="Generalization"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Generalization_4015"
+ hint="4015">
+ <iconEntry
+ xmi:id="_tT1EUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Generalization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tT3gkLazEeSbnofizoRSMQ"
+ name="Information Flow"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021"
+ hint="4021">
+ <iconEntry
+ xmi:id="_tT3gkbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InformationFlow.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InformationFlow</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS2M4LazEeSbnofizoRSMQ"
+ name="Information Item"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InformationItem_3094"
+ hint="3094">
+ <iconEntry
+ xmi:id="_tS2M4bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InformationItem.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InformationItem</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTOnYLazEeSbnofizoRSMQ"
+ name="Information Item"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InformationItem_2080"
+ hint="2080">
+ <iconEntry
+ xmi:id="_tTOnYbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InformationItem.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InformationItem</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTiwcLazEeSbnofizoRSMQ"
+ name="Instance Value"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InstanceValue_2108"
+ hint="2108">
+ <iconEntry
+ xmi:id="_tTiwcbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InstanceValue.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InstanceValue</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSfAgLazEeSbnofizoRSMQ"
+ name="Interaction"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Interaction_3073"
+ hint="3073">
+ <iconEntry
+ xmi:id="_tSfAgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Interaction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interaction</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTBMALazEeSbnofizoRSMQ"
+ name="Interaction"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Interaction_2061"
+ hint="2061">
+ <iconEntry
+ xmi:id="_tTBMAbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Interaction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interaction</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS86kLazEeSbnofizoRSMQ"
+ name="Interaction Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_3119"
+ hint="3119">
+ <iconEntry
+ xmi:id="_tS86kbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InteractionConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InteractionConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTma0LazEeSbnofizoRSMQ"
+ name="Interaction Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_2113"
+ hint="2113">
+ <iconEntry
+ xmi:id="_tTma0bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InteractionConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InteractionConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSvfMLazEeSbnofizoRSMQ"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Interface_3087"
+ hint="3087">
+ <iconEntry
+ xmi:id="_tSvfMbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTJu4LazEeSbnofizoRSMQ"
+ name="Interface"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Interface_2076"
+ hint="2076">
+ <iconEntry
+ xmi:id="_tTJu4bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTpeILazEeSbnofizoRSMQ"
+ name="Interface Realization"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.InterfaceRealization_4005"
+ hint="4005">
+ <iconEntry
+ xmi:id="_tTpeIbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/InterfaceRealization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.InterfaceRealization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTiJYLazEeSbnofizoRSMQ"
+ name="Interval"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Interval_2107"
+ hint="2107">
+ <iconEntry
+ xmi:id="_tTiJYbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Interval.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Interval</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS7scLazEeSbnofizoRSMQ"
+ name="Interval Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_3118"
+ hint="3118">
+ <iconEntry
+ xmi:id="_tS7scbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/IntervalConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.IntervalConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTlzwLazEeSbnofizoRSMQ"
+ name="Interval Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_2112"
+ hint="2112">
+ <iconEntry
+ xmi:id="_tTlzwbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/IntervalConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.IntervalConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTXKQLazEeSbnofizoRSMQ"
+ name="Literal Boolean"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.LiteralBoolean_2095"
+ hint="2095">
+ <iconEntry
+ xmi:id="_tTXKQbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/LiteralBoolean.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.LiteralBoolean</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTYYYLazEeSbnofizoRSMQ"
+ name="Literal Integer"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.LiteralInteger_2096"
+ hint="2096">
+ <iconEntry
+ xmi:id="_tTYYYbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/LiteralInteger.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.LiteralInteger</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTY_cLazEeSbnofizoRSMQ"
+ name="Literal Null"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.LiteralNull_2097"
+ hint="2097">
+ <iconEntry
+ xmi:id="_tTY_cbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/LiteralNull.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.LiteralNull</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTZmgLazEeSbnofizoRSMQ"
+ name="Literal String"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.LiteralString_2098"
+ hint="2098">
+ <iconEntry
+ xmi:id="_tTZmgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/LiteralString.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.LiteralString</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTaNkLazEeSbnofizoRSMQ"
+ name="Literal Unlimited Natural"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.LiteralUnlimitedNatural_2099"
+ hint="2099">
+ <iconEntry
+ xmi:id="_tTaNkbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/LiteralUnlimitedNatural.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.LiteralUnlimitedNatural</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTr6YLazEeSbnofizoRSMQ"
+ name="Manifestation"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Manifestation_4012"
+ hint="4012">
+ <iconEntry
+ xmi:id="_tTr6YbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Manifestation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Manifestation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSp_oLazEeSbnofizoRSMQ"
+ name="Node"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Node_3084"
+ hint="3084">
+ <iconEntry
+ xmi:id="_tSp_obazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Node.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Node</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTHSoLazEeSbnofizoRSMQ"
+ name="Node"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Node_2072"
+ hint="2072">
+ <iconEntry
+ xmi:id="_tTHSobazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Node.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Node</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSkgELazEeSbnofizoRSMQ"
+ name="Opaque Behavior"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_3077"
+ hint="3077">
+ <iconEntry
+ xmi:id="_tSkgEbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/OpaqueBehavior.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.OpaqueBehavior</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTEPULazEeSbnofizoRSMQ"
+ name="Opaque Behavior"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_2065"
+ hint="2065">
+ <iconEntry
+ xmi:id="_tTEPUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/OpaqueBehavior.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.OpaqueBehavior</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTd38LazEeSbnofizoRSMQ"
+ name="Opaque Expression"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.OpaqueExpression_2101"
+ hint="2101">
+ <iconEntry
+ xmi:id="_tTd38bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/OpaqueExpression.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.OpaqueExpression</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS-vwLazEeSbnofizoRSMQ"
+ name="Operation"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Operation_3102"
+ hint="3102">
+ <iconEntry
+ xmi:id="_tS-vwbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tOrekLazEeSbnofizoRSMQ"
+ name="Package"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Package_1000"
+ hint="CompositeStructure">
+ <iconEntry
+ xmi:id="_tOrekbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Package.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSXEsLazEeSbnofizoRSMQ"
+ name="Parameter"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Parameter_3088"
+ hint="3088">
+ <iconEntry
+ xmi:id="_tSXEsbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Parameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Parameter</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSVPgLazEeSbnofizoRSMQ"
+ name="Port"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Port_3069"
+ hint="3069">
+ <iconEntry
+ xmi:id="_tSVPgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Port.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSwtULazEeSbnofizoRSMQ"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_3078"
+ hint="3078">
+ <iconEntry
+ xmi:id="_tSwtUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTKV8LazEeSbnofizoRSMQ"
+ name="Primitive Type"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_2066"
+ hint="2066">
+ <iconEntry
+ xmi:id="_tTKV8bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/PrimitiveType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.PrimitiveType</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSYS0LazEeSbnofizoRSMQ"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Property_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_tSYS0bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS-IsLazEeSbnofizoRSMQ"
+ name="Property"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Property_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_tS-IsbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSg1sLazEeSbnofizoRSMQ"
+ name="Protocol State Machine"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_3074"
+ hint="3074">
+ <iconEntry
+ xmi:id="_tSg1sbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ProtocolStateMachine.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ProtocolStateMachine</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTBzELazEeSbnofizoRSMQ"
+ name="Protocol State Machine"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_2062"
+ hint="2062">
+ <iconEntry
+ xmi:id="_tTBzEbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/ProtocolStateMachine.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.ProtocolStateMachine</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTrTULazEeSbnofizoRSMQ"
+ name="Realization"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Realization_4006"
+ hint="4006">
+ <iconEntry
+ xmi:id="_tTrTUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Realization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Realization</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tT2ScbazEeSbnofizoRSMQ"
+ name="Representation"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"
+ hint="4020">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTuWoLazEeSbnofizoRSMQ"
+ name="Role Binding"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.RoleBinding_4017"
+ hint="4017">
+ <iconEntry
+ xmi:id="_tTuWobazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.CollaborationUse.RoleBinding</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS2z8LazEeSbnofizoRSMQ"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Signal_3095"
+ hint="3095">
+ <iconEntry
+ xmi:id="_tS2z8bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTPOcLazEeSbnofizoRSMQ"
+ name="Signal"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Signal_2081"
+ hint="2081">
+ <iconEntry
+ xmi:id="_tTPOcbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Signal.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Signal</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTQckLazEeSbnofizoRSMQ"
+ name="Signal Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.SignalEvent_2083"
+ hint="2083">
+ <iconEntry
+ xmi:id="_tTQckbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/SignalEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.SignalEvent</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tSiD0LazEeSbnofizoRSMQ"
+ name="State Machine"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.StateMachine_3075"
+ hint="3075">
+ <iconEntry
+ xmi:id="_tSiD0bazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/StateMachine.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.StateMachine</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTCaILazEeSbnofizoRSMQ"
+ name="State Machine"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.StateMachine_2063"
+ hint="2063">
+ <iconEntry
+ xmi:id="_tTCaIbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/StateMachine.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.StateMachine</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTa0oLazEeSbnofizoRSMQ"
+ name="String Expression"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.StringExpression_2100"
+ hint="2100">
+ <iconEntry
+ xmi:id="_tTa0obazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/StringExpression.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.StringExpression_As_UML::Package::packagedElement</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTqFMLazEeSbnofizoRSMQ"
+ name="Substitution"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Substitution_4011"
+ hint="4011">
+ <iconEntry
+ xmi:id="_tTqFMbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Substitution.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Substitution</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS6eULazEeSbnofizoRSMQ"
+ name="Time Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_3117"
+ hint="3117">
+ <iconEntry
+ xmi:id="_tS6eUbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTlMsLazEeSbnofizoRSMQ"
+ name="Time Constraint"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_2111"
+ hint="2111">
+ <iconEntry
+ xmi:id="_tTlMsbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeConstraint.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeConstraint</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTTf4LazEeSbnofizoRSMQ"
+ name="Time Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeEvent_2089"
+ hint="2089">
+ <iconEntry
+ xmi:id="_tTUuALazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeEvent</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTefALazEeSbnofizoRSMQ"
+ name="Time Expression"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeExpression_2102"
+ hint="2102">
+ <iconEntry
+ xmi:id="_tTefAbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeExpression.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeExpression</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTg7QLazEeSbnofizoRSMQ"
+ name="Time Interval"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeInterval_2105"
+ hint="2105">
+ <iconEntry
+ xmi:id="_tTg7QbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeInterval.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeInterval</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTWjMLazEeSbnofizoRSMQ"
+ name="Time Observation"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeObservation_2094"
+ hint="2094">
+ <iconEntry
+ xmi:id="_tTWjMbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/TimeObservation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.TimeObservation</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tT1rYLazEeSbnofizoRSMQ"
+ name="Time Observation Event"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.TimeObservationEvent_4018"
+ hint="4018">
+ <specializedTypesID>org.eclipse.gmf.runtime.emf.type.core.null</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTtIgLazEeSbnofizoRSMQ"
+ name="Usage"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.Usage_4008"
+ hint="4008">
+ <iconEntry
+ xmi:id="_tTtIgbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/Usage.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.Usage</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tS4CELazEeSbnofizoRSMQ"
+ name="Use Case"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.UseCase_3096"
+ hint="3096">
+ <iconEntry
+ xmi:id="_tS4CEbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/UseCase.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.UseCase</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_tTP1gLazEeSbnofizoRSMQ"
+ name="Use Case"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.UseCase_2082"
+ hint="2082">
+ <iconEntry
+ xmi:id="_tTP1gbazEeSbnofizoRSMQ"
+ iconPath="/icons/full/obj16/UseCase.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.uml.UseCase</specializedTypesID>
+ </elementTypeConfigurations>
+ <adviceBindingsConfigurations
+ xmi:id="_0kx7YLgREeSsJKs23mSE-A"
+ description="Generalizarion specific advices (remove inconsistent views when a Generalization is deleted"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.GeneralizationHelperAdvice"
+ editHelperAdviceClassName="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.GeneralizationHelperAdvice"
+ inheritance="all">
+ <target
+ xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"
+ href="../../org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_Scma8FYCEeS0WsAAtVmToA"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations
+ xmi:id="_DnjXALgSEeSsJKs23mSE-A"
+ description="Property specific advices (remove inconsistent views when a Property type is set"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.PropertyHelperAdvice"
+ editHelperAdviceClassName="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.PropertyHelperAdvice"
+ inheritance="all">
+ <target
+ xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"
+ href="../../org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_Sc-1cFYCEeS0WsAAtVmToA"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations
+ xmi:id="_Q8xrsLgSEeSsJKs23mSE-A"
+ description="Collaboration specific advices (remove inconsistent views when a CollaborationRole is removed"
+ identifier="org.eclipse.papyrus.uml.diagram.composite.CollaborationHelperAdvice"
+ editHelperAdviceClassName="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.CollaborationHelperAdvice"
+ inheritance="all">
+ <target
+ xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"
+ href="../../org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_Sca07VYCEeS0WsAAtVmToA"/>
+ </adviceBindingsConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen
index f4a2567c753..e0f670fd85d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen
@@ -1,3863 +1,8264 @@
<?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.composite" modelID="CompositeStructure" diagramFileExtension="uml_csd" domainFileExtension="uml" 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="CompositeStructureDiagramEditPart" itemSemanticEditPolicyClassName="CompositeStructureDiagramItemSemanticEditPolicy" canonicalEditPolicyClassName="CompositeStructureDiagramCanonicalEditPolicy" iconProviderPriority="Low" baseEditHelperClassName="UMLBaseEditHelper" creationWizardIconPath="icons/obj16/Diagram_CompositeStructure.gif" validationProviderPriority="Low" validationEnabled="true" validationDecorators="true" liveValidationUIFeedback="true" synchronized="false">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType xsi:type="gmfgen:MetamodelType" displayName="CompositeStructureDiagram" editHelperClassName="PackageEditHelper"/>
- <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.composite.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <domainDiagramElement href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes visualID="3121" editPartClassName="BehaviorPortEditPart" itemSemanticEditPolicyClassName="BehaviorPortItemSemanticEditPolicy" canonicalEditPolicyClassName="BehaviorPortCanonicalEditPolicy" graphicalNodeEditPolicyClassName="BehaviorPortGraphicalNodeEditPolicy" createCommandClassName="BehaviorPortCreateCommand" containers="/0/@diagram/@compartments.16">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:NotationType"/>
- <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.composite.custom.edit.policies.BehaviorSymbolEditPolicy.BEHAVIOR_SYMBOL" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorSymbolEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoConnectableEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
- <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="6053" editPartClassName="BehaviorPortFloatingLabelEditPart" itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
- <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 xsi:type="gmfgen:GenChildSideAffixedNode" visualID="3069" editPartClassName="PortEditPart" itemSemanticEditPolicyClassName="PortItemSemanticEditPolicy" canonicalEditPolicyClassName="PortCanonicalEditPolicy" graphicalNodeEditPolicyClassName="PortGraphicalNodeEditPolicy" createCommandClassName="PortCreateCommand" containers="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.6">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="PortEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.PortFigure">
- <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.composite.custom.edit.policies.CustomPortItemSemanticEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortLayoutEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy.BEHAVIOR_PORT" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy"/>
- <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.MaskManagedNodeEditPolicy"/>
- <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/Port"/>
- <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>
- <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property/aggregation"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5125" editPartClassName="PortNameEditPart" itemSemanticEditPolicyClassName="PortNameItemSemanticEditPolicy" 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="25" y="3"/>
- </viewmap>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPortLabelEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY" editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy"/>
- <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="6029" editPartClassName="PortAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="PortAppliedStereotypeItemSemanticEditPolicy" 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="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="&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 xsi:type="gmfgen:GenChildSideAffixedNode" visualID="3088" editPartClassName="ParameterEditPart" itemSemanticEditPolicyClassName="ParameterItemSemanticEditPolicy" canonicalEditPolicyClassName="ParameterCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ParameterGraphicalNodeEditPolicy" createCommandClassName="ParameterCreateCommand" containers="/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/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.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.composite.Parameter_3088" displayName="Parameter" editHelperClassName="ParameterEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ParameterFigure">
- <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.composite.custom.edit.policies.CustomParameterItemSemanticEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.ParameterLayoutEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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/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.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="6033" editPartClassName="ParameterNameEditPart" itemSemanticEditPolicyClassName="ParameterNameItemSemanticEditPolicy" 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="25" y="3"/>
- </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.composite.custom.edit.policies.ParameterLabelEditPolicy"/>
- <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="6034" editPartClassName="ParameterAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="ParameterAppliedStereotypeItemSemanticEditPolicy" 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="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="&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="3070" editPartClassName="PropertyPartEditPartCN" itemSemanticEditPolicyClassName="PropertyPartItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PropertyPartCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.30" graphicalNodeEditPolicyClassName="PropertyPartGraphicalNodeEditPolicyCN" createCommandClassName="PropertyPartCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30">
- <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.composite.custom.figures.PropertyPartFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomPropertyPartItemSemanticEditPolicyCN"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.PropertyLayoutEditPolicy"/>
- <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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy"/>
- <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.MaskManagedNodeEditPolicy"/>
- <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.2">
- <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>
- <labels visualID="5126" editPartClassName="PropertyPartNameEditPartCN" itemSemanticEditPolicyClassName="PropertyPartNameItemSemanticEditPolicyCN" 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.IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPropertyLabelEditPolicy"/>
- <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="6054" editPartClassName="PropertyPartFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="PropertyFloatingLabelItemSemanticEditPolicy">
- <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="3115" editPartClassName="CollaborationRoleEditPartCN" itemSemanticEditPolicyClassName="CollaborationRoleItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CollaborationRoleCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="CollaborationRoleGraphicalNodeEditPolicyCN" createCommandClassName="CollaborationRoleCreateCommandCN" containers="/0/@diagram/@compartments.17 /0/@diagram/@compartments.29">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.prototype.CollaborationRole_3115" displayName="CollaborationRole" editHelperClassName="CollaborationRoleEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationRoleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CollaborationRoleItemSemanticEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectableElement"/>
- <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/role"/>
- <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/role"/>
- <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="5198" editPartClassName="CollaborationRoleNameEditPartCN" itemSemanticEditPolicyClassName="CollaborationRoleNameItemSemanticEditPolicyCN" readOnly="true" 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" 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="6055" editPartClassName="CollaborationRoleFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="ConnectableElementFloatingLabelItemSemanticEditPolicy">
- <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" editPartClassName="CollaborationUseEditPartCN" itemSemanticEditPolicyClassName="CollaborationUseItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CollaborationUseCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="CollaborationUseGraphicalNodeEditPolicyCN" createCommandClassName="CollaborationUseCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="CollaborationUseEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomCollaborationUseItemSemanticEditPolicyCN"/>
- <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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/CollaborationUse"/>
- <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/collaborationUse"/>
- <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/collaborationUse"/>
- <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="5127" editPartClassName="CollaborationUseNameEditPart" itemSemanticEditPolicyClassName="CollaborationUseNameItemSemanticEditPolicy" 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.composite.custom.edit.policies.CollaborationUseLabelEditPolicy"/>
- <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="6056" editPartClassName="CollaborationUseFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="CollaborationUseFloatingLabelItemSemanticEditPolicy">
- <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="3072" editPartClassName="ActivityCompositeEditPartCN" itemSemanticEditPolicyClassName="ActivityCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ActivityCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.6" graphicalNodeEditPolicyClassName="ActivityCompositeGraphicalNodeEditPolicyCN" createCommandClassName="ActivityCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.ActivityCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/Activity"/>
- <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>
- <labels visualID="5128" editPartClassName="ActivityCompositeNameEditPartCN" itemSemanticEditPolicyClassName="ActivityCompositeNameItemSemanticEditPolicyCN" 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" 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="6057" editPartClassName="ActivityCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="ActivityFloatingLabelItemSemanticEditPolicy">
- <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="3073" editPartClassName="InteractionCompositeEditPartCN" itemSemanticEditPolicyClassName="InteractionCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InteractionCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.7" graphicalNodeEditPolicyClassName="InteractionCompositeGraphicalNodeEditPolicyCN" createCommandClassName="InteractionCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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>
- <labels visualID="5129" editPartClassName="InteractionCompositeNameEditPartCN" itemSemanticEditPolicyClassName="InteractionCompositeNameItemSemanticEditPolicyCN" 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" 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="6058" editPartClassName="InteractionCompositeFloatingLabelEditPartCN" 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"/>
- <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" editPartClassName="ProtocolStateMachineCompositeEditPartCN" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ProtocolStateMachineCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.8" graphicalNodeEditPolicyClassName="ProtocolStateMachineCompositeGraphicalNodeEditPolicyCN" createCommandClassName="ProtocolStateMachineCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.ProtocolStateMachineCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/ProtocolStateMachine"/>
- <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>
- <labels visualID="5130" editPartClassName="ProtocolStateMachineCompositeNameEditPartCN" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeNameItemSemanticEditPolicyCN" 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" 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="6059" editPartClassName="ProtocolStateMachineCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="ProtocolStateMachineFloatingLabelItemSemanticEditPolicy">
- <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="3075" editPartClassName="StateMachineCompositeEditPartCN" itemSemanticEditPolicyClassName="StateMachineCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="StateMachineCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.9" graphicalNodeEditPolicyClassName="StateMachineCompositeGraphicalNodeEditPolicyCN" createCommandClassName="StateMachineCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.StateMachineCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/StateMachine"/>
- <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>
- <labels visualID="5131" editPartClassName="StateMachineCompositeNameEditPartCN" itemSemanticEditPolicyClassName="StateMachineCompositeNameItemSemanticEditPolicyCN" 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" 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="6060" editPartClassName="StateMachineCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="StateMachineFloatingLabelItemSemanticEditPolicy">
- <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="3076" editPartClassName="FunctionBehaviorCompositeEditPartCN" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="FunctionBehaviorCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.10" graphicalNodeEditPolicyClassName="FunctionBehaviorCompositeGraphicalNodeEditPolicyCN" createCommandClassName="FunctionBehaviorCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.FunctionBehaviorCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/FunctionBehavior"/>
- <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>
- <labels visualID="5132" editPartClassName="FunctionBehaviorCompositeNameEditPartCN" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeNameItemSemanticEditPolicyCN" 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" 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="6061" editPartClassName="FunctionBehaviorCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="FunctionBehaviorFloatingLabelItemSemanticEditPolicy">
- <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="3077" editPartClassName="OpaqueBehaviorCompositeEditPartCN" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="OpaqueBehaviorCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.11" graphicalNodeEditPolicyClassName="OpaqueBehaviorCompositeGraphicalNodeEditPolicyCN" createCommandClassName="OpaqueBehaviorCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.OpaqueBehaviorCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/OpaqueBehavior"/>
- <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>
- <labels visualID="5133" editPartClassName="OpaqueBehaviorCompositeNameEditPartCN" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeNameItemSemanticEditPolicyCN" 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" 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="6062" editPartClassName="OpaqueBehaviorCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="OpaqueBehaviorFloatingLabelItemSemanticEditPolicy">
- <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="3081" editPartClassName="ComponentCompositeEditPartCN" itemSemanticEditPolicyClassName="ComponentCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.12" graphicalNodeEditPolicyClassName="ComponentCompositeGraphicalNodeEditPolicyCN" createCommandClassName="ComponentCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.ComponentCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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>
- <labels visualID="5137" editPartClassName="ComponentCompositeNameEditPartCN" itemSemanticEditPolicyClassName="ComponentCompositeNameItemSemanticEditPolicyCN" 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" 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="6063" editPartClassName="ComponentCompositeFloatingLabelEditPartCN" 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="3082" editPartClassName="DeviceCompositeEditPartCN" itemSemanticEditPolicyClassName="DeviceCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DeviceCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.13" graphicalNodeEditPolicyClassName="DeviceCompositeGraphicalNodeEditPolicyCN" createCommandClassName="DeviceCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.DeviceCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/Device"/>
- <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>
- <labels visualID="5138" editPartClassName="DeviceCompositeNameEditPartCN" itemSemanticEditPolicyClassName="DeviceCompositeNameItemSemanticEditPolicyCN" 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" 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="6064" editPartClassName="DeviceCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="DeviceFloatingLabelItemSemanticEditPolicy">
- <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="3083" editPartClassName="ExecutionEnvironmentCompositeEditPartCN" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.14" graphicalNodeEditPolicyClassName="ExecutionEnvironmentCompositeGraphicalNodeEditPolicyCN" createCommandClassName="ExecutionEnvironmentCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.8/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/ExecutionEnvironment"/>
- <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>
- <labels visualID="5139" editPartClassName="ExecutionEnvironmentCompositeNameEditPartCN" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeNameItemSemanticEditPolicyCN" 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" 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="6065" editPartClassName="ExecutionEnvironmentCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="ExecutionEnvironmentFloatingLabelItemSemanticEditPolicy">
- <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="3084" editPartClassName="NodeCompositeEditPartCN" itemSemanticEditPolicyClassName="NodeCompositeItemSemanticEditPolicycN" canonicalEditPolicyClassName="NodeCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.15" graphicalNodeEditPolicyClassName="NodeCompositeGraphicalNodeEditPolicyCN" createCommandClassName="NodeCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.9/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/Node"/>
- <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>
- <labels visualID="5140" editPartClassName="NodeCompositeNameEditPartCN" itemSemanticEditPolicyClassName="NodeCompositeNameItemSemanticEditPolicyCN" 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" 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="6066" editPartClassName="NodeCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
- <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="3085" editPartClassName="ClassCompositeEditPartCN" itemSemanticEditPolicyClassName="ClassCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassCompositeCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.16" graphicalNodeEditPolicyClassName="ClassCompositeGraphicalNodeEditPolicyCN" createCommandClassName="ClassCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.10/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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>
- <labels visualID="5155" editPartClassName="ClassCompositeNameEditPartCN" itemSemanticEditPolicyClassName="ClassCompositeNameItemSemanticEditPolicyCN" 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" 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="6067" editPartClassName="ClassCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="ClassFloatingLabelItemSemanticEditPolicy">
- <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="3086" editPartClassName="CollaborationCompositeEditPartCN" itemSemanticEditPolicyClassName="CollaborationCompositeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CollaborationCompositeCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.17" graphicalNodeEditPolicyClassName="CollaborationCompositeGraphicalNodeEditPolicyCN" createCommandClassName="CollaborationCompositeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="CollaborationEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure"/>
- <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.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/Collaboration"/>
- <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>
- <labels visualID="5141" editPartClassName="CollaborationCompositeNameEditPartCN" itemSemanticEditPolicyClassName="CollaborationCompositeNameItemSemanticEditPolicyCN" 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" 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="6068" editPartClassName="CollaborationCompositeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="CollaborationFloatingLabelItemSemanticEditPolicy">
- <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="3087" editPartClassName="InterfaceEditPartCN" itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicyCN" createCommandClassName="InterfaceCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.composite.custom.figures.InterfaceCompositeFigure"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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>
- <labels visualID="5154" 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.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="6069" editPartClassName="InterfaceFloatingLabelEditPartCN" 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="3078" editPartClassName="PrimitiveTypeEditPartCN" itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN" createCommandClassName="PrimitiveTypeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.13/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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>
- <labels visualID="5134" 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.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="6070" editPartClassName="PrimitiveTypeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="PrimitiveTypeFloatingLabelItemSemanticEditPolicy">
- <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" editPartClassName="EnumerationEditPartCN" itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN" canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.36" compartments="/0/@diagram/@compartments.5" graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN" createCommandClassName="EnumerationCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.14/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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>
- <labels visualID="5135" 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.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="6071" editPartClassName="EnumerationFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="EnumerationFloatingLabelItemSemanticEditPolicy">
- <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="3080" editPartClassName="DataTypeEditPartCN" itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3" graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN" createCommandClassName="DataTypeCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.15/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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>
- <labels visualID="5136" 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.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="6072" editPartClassName="DataTypeFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="DataTypeFloatingLabelItemSemanticEditPolicy">
- <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="3091" editPartClassName="ActorEditPartCN" itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ActorCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicyCN" createCommandClassName="ActorCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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/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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5144" editPartClassName="ActorNameEditPartCN" itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicyCN" 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" 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="6073" editPartClassName="ActorFloatingLabelEditPartCN" 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="3092" editPartClassName="DeploymentSpecificationEditPartCN" itemSemanticEditPolicyClassName="DeploymentSpecificationItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DeploymentSpecificationCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="DeploymentSpecificationGraphicalNodeEditPolicyCN" createCommandClassName="DeploymentSpecificationCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="DeploymentSpecificationEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentSpecification"/>
- <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>
- <labels visualID="5145" editPartClassName="DeploymentSpecificationNameEditPartCN" itemSemanticEditPolicyClassName="DeploymentSpecificationNameItemSemanticEditPolicyCN" 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" 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="6074" editPartClassName="DeploymentSpecificationFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="DeploymentSpecificationFloatingLabelItemSemanticEditPolicy">
- <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="3093" editPartClassName="ArtifactEditPartCN" itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyCN" createCommandClassName="ArtifactCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.common.figure.node.RoundedCompartmentFigure"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5146" editPartClassName="ArtifactNameEditPartCN" itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyCN" 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" 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="6075" 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"/>
- <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="3094" editPartClassName="InformationItemEditPartCN" itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InformationItemCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicyCN" createCommandClassName="InformationItemCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="InformationItemEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure">
- <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="80" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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/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>
- <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5147" 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.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="6076" editPartClassName="InformationItemFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="InformationItemFloatingLabelItemSemanticEditPolicy">
- <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="3095" editPartClassName="SignalEditPartCN" itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicyCN" canonicalEditPolicyClassName="SignalCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicyCN" createCommandClassName="SignalCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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"/>
- <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>
- <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>
- <labels visualID="5148" 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.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="6077" editPartClassName="SignalFloatingLabelEditPartCN" itemSemanticEditPolicyClassName="SignalFloatingLabelItemSemanticEditPolicy">
- <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="3096" editPartClassName="UseCaseEditPartCN" itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicyCN" canonicalEditPolicyClassName="UseCaseCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicyCN" createCommandClassName="UseCaseCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
- <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.common.figure.node.RoundedCompartmentFigure"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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/UseCase"/>
- <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>
- <labels visualID="5149" editPartClassName="UseCaseNameEditPartCN" itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicyCN" 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" 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="6078" editPartClassName="UseCaseFloatingLabelEditPartCN" 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="3097" editPartClassName="CommentEditPartCN" itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN" createCommandClassName="CommentCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" 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: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.12">
- <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.3">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes visualID="3116" editPartClassName="DurationConstraintEditPartCN" itemSemanticEditPolicyClassName="DurationConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DurationConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="DurationConstraintGraphicalNodeEditPolicyCN" createCommandClassName="DurationConstraintCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
- <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.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/DurationConstraint"/>
- <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.15">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="6040" editPartClassName="DurationConstraintNameEditPartCN" itemSemanticEditPolicyClassName="DurationConstraintNameItemSemanticEditPolicyCN" 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="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6041" editPartClassName="DurationConstraintSpecificationEditPartCN" itemSemanticEditPolicyClassName="DurationConstraintSpecificationItemSemanticEditPolicyCN">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes visualID="3117" editPartClassName="TimeConstraintEditPartCN" itemSemanticEditPolicyClassName="TimeConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="TimeConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="TimeConstraintGraphicalNodeEditPolicyCN" createCommandClassName="TimeConstraintCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
- <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.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/TimeConstraint"/>
- <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.16">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="6042" editPartClassName="TimeConstraintNameEditPartCN" itemSemanticEditPolicyClassName="TimeConstraintNameItemSemanticEditPolicyCN" 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="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6043" editPartClassName="TimeConstraintSpecificationEditPartCN" itemSemanticEditPolicyClassName="TimeConstraintSpecificationItemSemanticEditPolicyCN">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes visualID="3118" editPartClassName="IntervalConstraintEditPartCN" itemSemanticEditPolicyClassName="IntervalConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="IntervalConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="IntervalConstraintGraphicalNodeEditPolicyCN" createCommandClassName="IntervalConstraintCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
- <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.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/IntervalConstraint"/>
- <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.14">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="6044" editPartClassName="IntervalConstraintNameEditPartCN" itemSemanticEditPolicyClassName="IntervalConstraintNameItemSemanticEditPolicyCN" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6045" editPartClassName="IntervalConstraintSpecificationEditPartCN" itemSemanticEditPolicyClassName="IntervalConstraintSpecificationItemSemanticEditPolicyCN">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes visualID="3119" editPartClassName="InteractionConstraintEditPartCN" itemSemanticEditPolicyClassName="InteractionConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InteractionConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="InteractionConstraintGraphicalNodeEditPolicyCN" createCommandClassName="InteractionConstraintCreateCommandCN" containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
- <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.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/InteractionConstraint"/>
- <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.13">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="6046" editPartClassName="InteractionConstraintNameEditPartCN" itemSemanticEditPolicyClassName="InteractionConstraintNameItemSemanticEditPolicyCN" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6047" editPartClassName="InteractionConstraintSpecificationEditPartCN" itemSemanticEditPolicyClassName="InteractionConstraintSpecificationItemSemanticEditPolicyCN">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes visualID="3120" editPartClassName="ConstraintEditPartCN" itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN" createCommandClassName="ConstraintCreateCommandCN" containers="/0/@diagram/@compartments.28 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.29">
- <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.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.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.13">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="6048" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6049" 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.4">
- <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>
- <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3101" editPartClassName="PropertyEditPartCLN" itemSemanticEditPolicyClassName="PropertyItemSemanticEditPolicyCLN" canonicalEditPolicyClassName="PropertyCanonicalEditPolicyCLN" graphicalNodeEditPolicyClassName="PropertyGraphicalNodeEditPolicyCLN" createCommandClassName="PropertyCreateCommandCLN" containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.0" labelElementIcon="true">
- <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.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <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="{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="3102" editPartClassName="OperationEditPartCLN" itemSemanticEditPolicyClassName="OperationItemSemanticEditPolicyCLN" canonicalEditPolicyClassName="OperationCanonicalEditPolicyCLN" graphicalNodeEditPolicyClassName="OperationGraphicalNodeEditPolicyCLN" createCommandClassName="OperationCreateCommandCLN" containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.1" labelElementIcon="true">
- <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.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <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" viewPattern="{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="3066" editPartClassName="EnumerationLiteralEditPartCLN" itemSemanticEditPolicyClassName="EnumerationLiteralItemSemanticEditPolicyCLN" canonicalEditPolicyClassName="EnumerationLiteralCanonicalEditPolicyCLN" graphicalNodeEditPolicyClassName="EnumerationLiteralGraphicalNodeEditPolicyCLN" createCommandClassName="EnumerationLiteralCreateCommandCLN" containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.4 /0/@diagram/@topLevelNodes.14 /0/@diagram/@childNodes.20" 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.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <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.0" viewPattern="{0} " editorPattern="{0}" editPattern="{0}">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <topLevelNodes visualID="2060" editPartClassName="ActivityCompositeEditPart" itemSemanticEditPolicyClassName="ActivityCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="ActivityCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.18" graphicalNodeEditPolicyClassName="ActivityCompositeGraphicalNodeEditPolicy" createCommandClassName="ActivityCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ActivityEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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="5112" editPartClassName="ActivityCompositeNameEditPart" itemSemanticEditPolicyClassName="ActivityCompositeNameItemSemanticEditPolicy" 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" 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="6079" editPartClassName="ActivityCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="ActivityFloatingLabelItemSemanticEditPolicy">
- <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="2061" editPartClassName="InteractionCompositeEditPart" itemSemanticEditPolicyClassName="InteractionCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="InteractionCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.19" graphicalNodeEditPolicyClassName="InteractionCompositeGraphicalNodeEditPolicy" createCommandClassName="InteractionCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="InteractionEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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="5113" editPartClassName="InteractionCompositeNameEditPart" itemSemanticEditPolicyClassName="InteractionCompositeNameItemSemanticEditPolicy" 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" 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="6080" editPartClassName="InteractionCompositeFloatingLabelEditPart" 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"/>
- <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="2062" editPartClassName="ProtocolStateMachineCompositeEditPart" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="ProtocolStateMachineCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.20" graphicalNodeEditPolicyClassName="ProtocolStateMachineCompositeGraphicalNodeEditPolicy" createCommandClassName="ProtocolStateMachineCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ProtocolStateMachineEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/ProtocolStateMachine"/>
- <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="5114" editPartClassName="ProtocolStateMachineCompositeNameEditPart" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeNameItemSemanticEditPolicy" 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" 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="6081" editPartClassName="ProtocolStateMachineCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="ProtocolStateMachineFloatingLabelItemSemanticEditPolicy">
- <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="2063" editPartClassName="StateMachineCompositeEditPart" itemSemanticEditPolicyClassName="StateMachineCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="StateMachineCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.21" graphicalNodeEditPolicyClassName="StateMachineCompositeGraphicalNodeEditPolicy" createCommandClassName="StateMachineCompositeCreateCommand">
- <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.composite.custom.figures.StateMachineCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5115" editPartClassName="StateMachineCompositeNameEditPart" itemSemanticEditPolicyClassName="StateMachineCompositeNameItemSemanticEditPolicy" 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" 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="6082" editPartClassName="StateMachineCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="StateMachineFloatingLabelItemSemanticEditPolicy">
- <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="2064" editPartClassName="FunctionBehaviorCompositeEditPart" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="FunctionBehaviorCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.22" graphicalNodeEditPolicyClassName="FunctionBehaviorCompositeGraphicalNodeEditPolicy" createCommandClassName="FunctionBehaviorCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="FunctionBehaviorEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/FunctionBehavior"/>
- <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="5116" editPartClassName="FunctionBehaviorCompositeNameEditPart" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeNameItemSemanticEditPolicy" 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" 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="6083" editPartClassName="FunctionBehaviorCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="FunctionBehaviorFloatingLabelItemSemanticEditPolicy">
- <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="2065" editPartClassName="OpaqueBehaviorCompositeEditPart" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="OpaqueBehaviorCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" compartments="/0/@diagram/@compartments.23" graphicalNodeEditPolicyClassName="OpaqueBehaviorCompositeGraphicalNodeEditPolicy" createCommandClassName="OpaqueBehaviorCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="OpaqueBehaviorEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/OpaqueBehavior"/>
- <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="5117" editPartClassName="OpaqueBehaviorCompositeNameEditPart" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeNameItemSemanticEditPolicy" 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" 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="6084" editPartClassName="OpaqueBehaviorCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="OpaqueBehaviorFloatingLabelItemSemanticEditPolicy">
- <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="2069" editPartClassName="ComponentCompositeEditPart" itemSemanticEditPolicyClassName="ComponentCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.24" graphicalNodeEditPolicyClassName="ComponentCompositeGraphicalNodeEditPolicy" createCommandClassName="ComponentCompositeCreateCommand">
- <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.composite.custom.figures.ComponentCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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="5121" editPartClassName="ComponentCompositeNameEditPart" itemSemanticEditPolicyClassName="ComponentCompositeNameItemSemanticEditPolicy" 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" 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="6085" editPartClassName="ComponentCompositeFloatingLabelEditPart" 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="2070" editPartClassName="DeviceCompositeEditPart" itemSemanticEditPolicyClassName="DeviceCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="DeviceCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.25" graphicalNodeEditPolicyClassName="DeviceCompositeGraphicalNodeEditPolicy" createCommandClassName="DeviceCompositeCreateCommand">
- <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.composite.custom.figures.DeviceCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5122" editPartClassName="DeviceCompositeNameEditPart" itemSemanticEditPolicyClassName="DeviceCompositeNameItemSemanticEditPolicy" 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" 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="6086" editPartClassName="DeviceCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="DeviceFloatingLabelItemSemanticEditPolicy">
- <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="2071" editPartClassName="ExecutionEnvironmentCompositeEditPart" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.26" graphicalNodeEditPolicyClassName="ExecutionEnvironmentCompositeGraphicalNodeEditPolicy" createCommandClassName="ExecutionEnvironmentCompositeCreateCommand">
- <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.composite.custom.figures.ExecutionEnvironmentCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5123" editPartClassName="ExecutionEnvironmentCompositeNameEditPart" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeNameItemSemanticEditPolicy" 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" 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="6087" editPartClassName="ExecutionEnvironmentCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="ExecutionEnvironmentFloatingLabelItemSemanticEditPolicy">
- <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="2072" editPartClassName="NodeCompositeEditPart" itemSemanticEditPolicyClassName="NodeCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="NodeCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.27" graphicalNodeEditPolicyClassName="NodeCompositeGraphicalNodeEditPolicy" createCommandClassName="NodeCompositeCreateCommand">
- <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.composite.custom.figures.NodeCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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/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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5124" editPartClassName="NodeCompositeNameEditPart" itemSemanticEditPolicyClassName="NodeCompositeNameItemSemanticEditPolicy" 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" 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="6088" editPartClassName="NodeCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
- <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="2073" editPartClassName="ClassCompositeEditPart" itemSemanticEditPolicyClassName="ClassCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassCompositeCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.28" graphicalNodeEditPolicyClassName="ClassCompositeGraphicalNodeEditPolicy" createCommandClassName="ClassCompositeCreateCommand">
- <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.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy"/>
- <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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="5156" editPartClassName="ClassCompositeNameEditPart" itemSemanticEditPolicyClassName="ClassCompositeNameItemSemanticEditPolicy" 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" 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="6089" editPartClassName="ClassCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="ClassFloatingLabelItemSemanticEditPolicy">
- <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="2075" editPartClassName="CollaborationCompositeEditPart" itemSemanticEditPolicyClassName="CollaborationCompositeItemSemanticEditPolicy" canonicalEditPolicyClassName="CollaborationCompositeCanonicalEditPolicy" compartments="/0/@diagram/@compartments.29" graphicalNodeEditPolicyClassName="CollaborationCompositeGraphicalNodeEditPolicy" createCommandClassName="CollaborationCompositeCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.17/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure"/>
- <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.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/Collaboration"/>
- <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="5158" editPartClassName="CollaborationCompositeNameEditPart" itemSemanticEditPolicyClassName="CollaborationCompositeNameItemSemanticEditPolicy" 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" 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="6090" editPartClassName="CollaborationCompositeFloatingLabelEditPart" itemSemanticEditPolicyClassName="CollaborationFloatingLabelItemSemanticEditPolicy">
- <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="2076" editPartClassName="InterfaceEditPart" itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceCanonicalEditPolicy" graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicy" createCommandClassName="InterfaceCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.18/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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="5159" 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.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="6091" 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>
- <topLevelNodes visualID="2066" editPartClassName="PrimitiveTypeEditPart" itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicy" canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicy" graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicy" createCommandClassName="PrimitiveTypeCreateCommand">
- <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"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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="5118" 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.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="6092" editPartClassName="PrimitiveTypeFloatingLabelEditPart" itemSemanticEditPolicyClassName="PrimitiveTypeFloatingLabelItemSemanticEditPolicy">
- <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="2067" editPartClassName="EnumerationEditPart" itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicy" canonicalEditPolicyClassName="EnumerationCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.36" compartments="/0/@diagram/@compartments.4" graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicy" createCommandClassName="EnumerationCreateCommand">
- <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"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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="5119" 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.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="6093" editPartClassName="EnumerationFloatingLabelEditPart" itemSemanticEditPolicyClassName="EnumerationFloatingLabelItemSemanticEditPolicy">
- <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="2068" editPartClassName="DataTypeEditPart" itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeCanonicalEditPolicy" compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1" graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicy" createCommandClassName="DataTypeCreateCommand">
- <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"/>
- <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <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/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="5120" 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.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="6094" editPartClassName="DataTypeFloatingLabelEditPart" itemSemanticEditPolicyClassName="DataTypeFloatingLabelItemSemanticEditPolicy">
- <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="2077" editPartClassName="ActorEditPart" itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicy" canonicalEditPolicyClassName="ActorCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicy" createCommandClassName="ActorCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.22/@elementType"/>
- <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.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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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/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/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="5160" editPartClassName="ActorNameEditPart" itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicy" 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" 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="6095" editPartClassName="ActorFloatingLabelEditPart" 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="2078" editPartClassName="DeploymentSpecificationEditPart" itemSemanticEditPolicyClassName="DeploymentSpecificationItemSemanticEditPolicy" canonicalEditPolicyClassName="DeploymentSpecificationCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DeploymentSpecificationGraphicalNodeEditPolicy" createCommandClassName="DeploymentSpecificationCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.23/@elementType"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentSpecification"/>
- <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="DeploymentSpecificationNameEditPart" itemSemanticEditPolicyClassName="DeploymentSpecificationNameItemSemanticEditPolicy" 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" 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="6096" editPartClassName="DeploymentSpecificationFloatingLabelEditPart" itemSemanticEditPolicyClassName="DeploymentSpecificationFloatingLabelItemSemanticEditPolicy">
- <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="2079" editPartClassName="ArtifactEditPart" itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicy" canonicalEditPolicyClassName="ArtifactCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicy" createCommandClassName="ArtifactCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.24/@elementType"/>
- <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.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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.0/@expressions.0">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5162" editPartClassName="ArtifactNameEditPart" itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicy" 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" 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="6097" 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"/>
- <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="2080" editPartClassName="InformationItemEditPart" itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicy" canonicalEditPolicyClassName="InformationItemCanonicalEditPolicy" graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicy" createCommandClassName="InformationItemCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.25/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure">
- <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="80" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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>
- <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5163" 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.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="6098" editPartClassName="InformationItemFloatingLabelEditPart" itemSemanticEditPolicyClassName="InformationItemFloatingLabelItemSemanticEditPolicy">
- <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="2081" editPartClassName="SignalEditPart" itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicy" canonicalEditPolicyClassName="SignalCanonicalEditPolicy" graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicy" createCommandClassName="SignalCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.26/@elementType"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure"/>
- <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>
- <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="5164" 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.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="6099" editPartClassName="SignalFloatingLabelEditPart" itemSemanticEditPolicyClassName="SignalFloatingLabelItemSemanticEditPolicy">
- <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="2082" editPartClassName="UseCaseEditPart" itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicy" canonicalEditPolicyClassName="UseCaseCanonicalEditPolicy" graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicy" createCommandClassName="UseCaseCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.27/@elementType"/>
- <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.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.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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/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/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="5165" editPartClassName="UseCaseNameEditPart" itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicy" 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" 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="6100" editPartClassName="UseCaseFloatingLabelEditPart" 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="2083" editPartClassName="SignalEventEditPart" itemSemanticEditPolicyClassName="SignalEventItemSemanticEditPolicy" canonicalEditPolicyClassName="SignalEventCanonicalEditPolicy" graphicalNodeEditPolicyClassName="SignalEventGraphicalNodeEditPolicy" createCommandClassName="SignalEventCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="SignalEventEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SignalEvent"/>
- <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="5166" editPartClassName="SignalEventNameEditPart" itemSemanticEditPolicyClassName="SignalEventNameItemSemanticEditPolicy" 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" 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="6101" editPartClassName="SignalEventFloatingLabelEditPart" itemSemanticEditPolicyClassName="SignalEventFloatingLabelItemSemanticEditPolicy">
- <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="2084" editPartClassName="CallEventEditPart" itemSemanticEditPolicyClassName="CallEventItemSemanticEditPolicy" canonicalEditPolicyClassName="CallEventCanonicalEditPolicy" graphicalNodeEditPolicyClassName="CallEventGraphicalNodeEditPolicy" createCommandClassName="CallEventCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="CallEventEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallEvent"/>
- <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="5167" editPartClassName="CallEventNameEditPart" itemSemanticEditPolicyClassName="CallEventNameItemSemanticEditPolicy" 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" 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="6102" editPartClassName="CallEventFloatingLabelEditPart" itemSemanticEditPolicyClassName="CallEventFloatingLabelItemSemanticEditPolicy">
- <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="2085" editPartClassName="AnyReceiveEventEditPart" itemSemanticEditPolicyClassName="AnyReceiveEventItemSemanticEditPolicy" canonicalEditPolicyClassName="AnyReceiveEventCanonicalEditPolicy" graphicalNodeEditPolicyClassName="AnyReceiveEventGraphicalNodeEditPolicy" createCommandClassName="AnyReceiveEventCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="AnyReceiveEventEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AnyReceiveEvent"/>
- <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="5168" editPartClassName="AnyReceiveEventNameEditPart" itemSemanticEditPolicyClassName="AnyReceiveEventNameItemSemanticEditPolicy" 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" 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="6103" editPartClassName="AnyReceiveEventFloatingLabelEditPart" itemSemanticEditPolicyClassName="AnyReceiveEventFloatingLabelItemSemanticEditPolicy">
- <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="2088" editPartClassName="ChangeEventEditPart" itemSemanticEditPolicyClassName="ChangeEventItemSemanticEditPolicy" canonicalEditPolicyClassName="ChangeEventCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ChangeEventGraphicalNodeEditPolicy" createCommandClassName="ChangeEventCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ChangeEventEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ChangeEvent"/>
- <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="5171" editPartClassName="ChangeEventNameEditPart" itemSemanticEditPolicyClassName="ChangeEventNameItemSemanticEditPolicy" 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" 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="6104" editPartClassName="ChangeEventFloatingLabelEditPart" itemSemanticEditPolicyClassName="ChangeEventFloatingLabelItemSemanticEditPolicy">
- <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="2089" editPartClassName="TimeEventEditPart" itemSemanticEditPolicyClassName="TimeEventItemSemanticEditPolicy" canonicalEditPolicyClassName="TimeEventCanonicalEditPolicy" graphicalNodeEditPolicyClassName="TimeEventGraphicalNodeEditPolicy" createCommandClassName="TimeEventCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="TimeEventEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeEvent"/>
- <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="5172" editPartClassName="TimeEventNameEditPart" itemSemanticEditPolicyClassName="TimeEventNameItemSemanticEditPolicy" 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" 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="6105" editPartClassName="TimeEventFloatingLabelEditPart" itemSemanticEditPolicyClassName="TimeEventFloatingLabelItemSemanticEditPolicy">
- <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="2093" 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">
- <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.ObservationLayoutEditPolicy"/>
- <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"/>
- <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="5151" 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.0">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5152" 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.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>
- </topLevelNodes>
- <topLevelNodes visualID="2094" 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">
- <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <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.composite.custom.edit.policies.ObservationLayoutEditPolicy"/>
- <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="5142" 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.0">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5143" 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.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>
- </topLevelNodes>
- <topLevelNodes visualID="2095" editPartClassName="LiteralBooleanEditPart" itemSemanticEditPolicyClassName="LiteralBooleanItemSemanticEditPolicy" canonicalEditPolicyClassName="LiteralBooleanCanonicalEditPolicy" graphicalNodeEditPolicyClassName="LiteralBooleanGraphicalNodeEditPolicy" createCommandClassName="LiteralBooleanCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="LiteralBooleanEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralBoolean"/>
- <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="5178" editPartClassName="LiteralBooleanNameEditPart" itemSemanticEditPolicyClassName="LiteralBooleanNameItemSemanticEditPolicy" 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" 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="6106" editPartClassName="LiteralBooleanFloatingLabelEditPart" itemSemanticEditPolicyClassName="LiteralBooleanFloatingLabelItemSemanticEditPolicy">
- <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="2096" editPartClassName="LiteralIntegerEditPart" itemSemanticEditPolicyClassName="LiteralIntegerItemSemanticEditPolicy" canonicalEditPolicyClassName="LiteralIntegerCanonicalEditPolicy" graphicalNodeEditPolicyClassName="LiteralIntegerGraphicalNodeEditPolicy" createCommandClassName="LiteralIntegerCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="LiteralIntegerEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralInteger"/>
- <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="5179" editPartClassName="LiteralIntegerNameEditPart" itemSemanticEditPolicyClassName="LiteralIntegerNameItemSemanticEditPolicy" 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" 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="6107" editPartClassName="LiteralIntegerFloatingLabelEditPart" itemSemanticEditPolicyClassName="LiteralIntegerFloatingLabelItemSemanticEditPolicy">
- <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="2097" editPartClassName="LiteralNullEditPart" itemSemanticEditPolicyClassName="LiteralNullItemSemanticEditPolicy" canonicalEditPolicyClassName="LiteralNullCanonicalEditPolicy" graphicalNodeEditPolicyClassName="LiteralNullGraphicalNodeEditPolicy" createCommandClassName="LiteralNullCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="LiteralNullEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralNull"/>
- <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="5180" editPartClassName="LiteralNullNameEditPart" itemSemanticEditPolicyClassName="LiteralNullNameItemSemanticEditPolicy" 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" 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="6108" editPartClassName="LiteralNullFloatingLabelEditPart" itemSemanticEditPolicyClassName="LiteralNullFloatingLabelItemSemanticEditPolicy">
- <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="2098" editPartClassName="LiteralStringEditPart" itemSemanticEditPolicyClassName="LiteralStringItemSemanticEditPolicy" canonicalEditPolicyClassName="LiteralStringCanonicalEditPolicy" graphicalNodeEditPolicyClassName="LiteralStringGraphicalNodeEditPolicy" createCommandClassName="LiteralStringCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="LiteralStringEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralString"/>
- <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="5181" editPartClassName="LiteralStringNameEditPart" itemSemanticEditPolicyClassName="LiteralStringNameItemSemanticEditPolicy" 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" 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="6109" editPartClassName="LiteralStringFloatingLabelEditPart" itemSemanticEditPolicyClassName="LiteralStringFloatingLabelItemSemanticEditPolicy">
- <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="2099" editPartClassName="LiteralUnlimitedNaturalEditPart" itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalItemSemanticEditPolicy" canonicalEditPolicyClassName="LiteralUnlimitedNaturalCanonicalEditPolicy" graphicalNodeEditPolicyClassName="LiteralUnlimitedNaturalGraphicalNodeEditPolicy" createCommandClassName="LiteralUnlimitedNaturalCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="LiteralUnlimitedNaturalEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralUnlimitedNatural"/>
- <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="5182" editPartClassName="LiteralUnlimitedNaturalNameEditPart" itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalNameItemSemanticEditPolicy" 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" 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="6110" editPartClassName="LiteralUnlimitedNaturalFloatingLabelEditPart" itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalFloatingLabelItemSemanticEditPolicy">
- <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="2100" editPartClassName="StringExpressionEditPart" itemSemanticEditPolicyClassName="StringExpressionItemSemanticEditPolicy" canonicalEditPolicyClassName="StringExpressionCanonicalEditPolicy" graphicalNodeEditPolicyClassName="StringExpressionGraphicalNodeEditPolicy" createCommandClassName="StringExpressionCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="StringExpressionEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StringExpression"/>
- <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="5183" editPartClassName="StringExpressionNameEditPart" itemSemanticEditPolicyClassName="StringExpressionNameItemSemanticEditPolicy" 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" 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="6111" editPartClassName="StringExpressionFloatingLabelEditPart" itemSemanticEditPolicyClassName="StringExpressionFloatingLabelItemSemanticEditPolicy">
- <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="2101" editPartClassName="OpaqueExpressionEditPart" itemSemanticEditPolicyClassName="OpaqueExpressionItemSemanticEditPolicy" canonicalEditPolicyClassName="OpaqueExpressionCanonicalEditPolicy" graphicalNodeEditPolicyClassName="OpaqueExpressionGraphicalNodeEditPolicy" createCommandClassName="OpaqueExpressionCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="OpaqueExpressionEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression"/>
- <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="5184" editPartClassName="OpaqueExpressionNameEditPart" itemSemanticEditPolicyClassName="OpaqueExpressionNameItemSemanticEditPolicy" 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" 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="6112" editPartClassName="OpaqueExpressionFloatingLabelEditPart" itemSemanticEditPolicyClassName="OpaqueExpressionFloatingLabelItemSemanticEditPolicy">
- <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="2102" editPartClassName="TimeExpressionEditPart" itemSemanticEditPolicyClassName="TimeExpressionItemSemanticEditPolicy" canonicalEditPolicyClassName="TimeExpressionCanonicalEditPolicy" graphicalNodeEditPolicyClassName="TimeExpressionGraphicalNodeEditPolicy" createCommandClassName="TimeExpressionCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="TimeExpressionEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeExpression"/>
- <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="5185" editPartClassName="TimeExpressionNameEditPart" itemSemanticEditPolicyClassName="TimeExpressionNameItemSemanticEditPolicy" 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" 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="6113" editPartClassName="TimeExpressionFloatingLabelEditPart" itemSemanticEditPolicyClassName="TimeExpressionFloatingLabelItemSemanticEditPolicy">
- <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="2103" editPartClassName="ExpressionEditPart" itemSemanticEditPolicyClassName="ExpressionItemSemanticEditPolicy" canonicalEditPolicyClassName="ExpressionCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ExpressionGraphicalNodeEditPolicy" createCommandClassName="ExpressionCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ExpressionEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Expression"/>
- <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="5186" editPartClassName="ExpressionNameEditPart" itemSemanticEditPolicyClassName="ExpressionNameItemSemanticEditPolicy" 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" 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="6114" editPartClassName="ExpressionFloatingLabelEditPart" itemSemanticEditPolicyClassName="ExpressionFloatingLabelItemSemanticEditPolicy">
- <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="2104" editPartClassName="DurationEditPart" itemSemanticEditPolicyClassName="DurationItemSemanticEditPolicy" canonicalEditPolicyClassName="DurationCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DurationGraphicalNodeEditPolicy" createCommandClassName="DurationCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="DurationEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Duration"/>
- <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="5187" editPartClassName="DurationNameEditPart" itemSemanticEditPolicyClassName="DurationNameItemSemanticEditPolicy" 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" 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="6115" editPartClassName="DurationFloatingLabelEditPart" itemSemanticEditPolicyClassName="DurationFloatingLabelItemSemanticEditPolicy">
- <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="2105" editPartClassName="TimeIntervalEditPart" itemSemanticEditPolicyClassName="TimeIntervalItemSemanticEditPolicy" canonicalEditPolicyClassName="TimeIntervalCanonicalEditPolicy" graphicalNodeEditPolicyClassName="TimeIntervalGraphicalNodeEditPolicy" createCommandClassName="TimeIntervalCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="TimeIntervalEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
- <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="5188" editPartClassName="TimeIntervalNameEditPart" itemSemanticEditPolicyClassName="TimeIntervalNameItemSemanticEditPolicy" 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="6116" editPartClassName="TimeIntervalFloatingLabelEditPart" itemSemanticEditPolicyClassName="TimeIntervalFloatingLabelItemSemanticEditPolicy">
- <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="2106" editPartClassName="DurationIntervalEditPart" itemSemanticEditPolicyClassName="DurationIntervalItemSemanticEditPolicy" canonicalEditPolicyClassName="DurationIntervalCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DurationIntervalGraphicalNodeEditPolicy" createCommandClassName="DurationIntervalCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="DurationIntervalEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
- <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="5189" editPartClassName="DurationIntervalNameEditPart" itemSemanticEditPolicyClassName="DurationIntervalNameItemSemanticEditPolicy" 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="6117" editPartClassName="DurationIntervalFloatingLabelEditPart" itemSemanticEditPolicyClassName="DurationIntervalFloatingLabelItemSemanticEditPolicy">
- <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="2107" editPartClassName="IntervalEditPart" itemSemanticEditPolicyClassName="IntervalItemSemanticEditPolicy" canonicalEditPolicyClassName="IntervalCanonicalEditPolicy" graphicalNodeEditPolicyClassName="IntervalGraphicalNodeEditPolicy" createCommandClassName="IntervalCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="IntervalEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval"/>
- <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="5190" editPartClassName="IntervalNameEditPart" itemSemanticEditPolicyClassName="IntervalNameItemSemanticEditPolicy" 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" 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="6118" editPartClassName="IntervalFloatingLabelEditPart" itemSemanticEditPolicyClassName="IntervalFloatingLabelItemSemanticEditPolicy">
- <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="2108" editPartClassName="InstanceValueEditPart" itemSemanticEditPolicyClassName="InstanceValueItemSemanticEditPolicy" canonicalEditPolicyClassName="InstanceValueCanonicalEditPolicy" graphicalNodeEditPolicyClassName="InstanceValueGraphicalNodeEditPolicy" createCommandClassName="InstanceValueCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="InstanceValueEditHelper"/>
- <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.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>
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceValue"/>
- <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="5191" editPartClassName="InstanceValueNameEditPart" itemSemanticEditPolicyClassName="InstanceValueNameItemSemanticEditPolicy" 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" 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="6119" editPartClassName="InstanceValueFloatingLabelEditPart" itemSemanticEditPolicyClassName="InstanceValueFloatingLabelItemSemanticEditPolicy">
- <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="2109" 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.28/@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.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.12">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5192" 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.3">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes visualID="2110" editPartClassName="DurationConstraintEditPart" itemSemanticEditPolicyClassName="DurationConstraintItemSemanticEditPolicy" canonicalEditPolicyClassName="DurationConstraintCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DurationConstraintGraphicalNodeEditPolicy" createCommandClassName="DurationConstraintCreateCommand">
- <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.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/DurationConstraint"/>
- <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.15">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5193" editPartClassName="DurationConstraintNameEditPart" itemSemanticEditPolicyClassName="DurationConstraintNameItemSemanticEditPolicy" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6035" editPartClassName="DurationConstraintSpecificationEditPart" itemSemanticEditPolicyClassName="DurationConstraintSpecificationItemSemanticEditPolicy">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes visualID="2111" editPartClassName="TimeConstraintEditPart" itemSemanticEditPolicyClassName="TimeConstraintItemSemanticEditPolicy" canonicalEditPolicyClassName="TimeConstraintCanonicalEditPolicy" graphicalNodeEditPolicyClassName="TimeConstraintGraphicalNodeEditPolicy" createCommandClassName="TimeConstraintCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="TimeConstraintEditHelper"/>
- <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/TimeConstraint"/>
- <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.16">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5194" editPartClassName="TimeConstraintNameEditPart" itemSemanticEditPolicyClassName="TimeConstraintNameItemSemanticEditPolicy" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6036" editPartClassName="TimeConstraintSpecificationEditPart" itemSemanticEditPolicyClassName="TimeConstraintSpecificationItemSemanticEditPolicy">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes visualID="2112" editPartClassName="IntervalConstraintEditPart" itemSemanticEditPolicyClassName="IntervalConstraintItemSemanticEditPolicy" canonicalEditPolicyClassName="IntervalConstraintCanonicalEditPolicy" graphicalNodeEditPolicyClassName="IntervalConstraintGraphicalNodeEditPolicy" createCommandClassName="IntervalConstraintCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="IntervalConstraintEditHelper"/>
- <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/IntervalConstraint"/>
- <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.14">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5195" editPartClassName="IntervalConstraintNameEditPart" itemSemanticEditPolicyClassName="IntervalConstraintNameItemSemanticEditPolicy" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6037" editPartClassName="IntervalConstraintSpecificationEditPart" itemSemanticEditPolicyClassName="IntervalConstraintSpecificationItemSemanticEditPolicy">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes visualID="2113" editPartClassName="InteractionConstraintEditPart" itemSemanticEditPolicyClassName="InteractionConstraintItemSemanticEditPolicy" canonicalEditPolicyClassName="InteractionConstraintCanonicalEditPolicy" graphicalNodeEditPolicyClassName="InteractionConstraintGraphicalNodeEditPolicy" createCommandClassName="InteractionConstraintCreateCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="InteractionConstraintEditHelper"/>
- <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/InteractionConstraint"/>
- <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.13">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5196" editPartClassName="InteractionConstraintNameEditPart" itemSemanticEditPolicyClassName="InteractionConstraintNameItemSemanticEditPolicy" 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" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6038" editPartClassName="InteractionConstraintSpecificationEditPart" itemSemanticEditPolicyClassName="InteractionConstraintSpecificationItemSemanticEditPolicy">
- <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"/>
- <editableMetaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes visualID="2114" 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"/>
- <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.13">
- <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels visualID="5197" 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.0" viewPattern="" editorPattern="" editPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6039" 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.4">
- <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>
- <links visualID="4022" editPartClassName="BehaviorPortLinkEditPart" itemSemanticEditPolicyClassName="BehaviorPortLinkItemSemanticEditPolicy" createCommandClassName="BehaviorPortLinkCreateCommand" reorientCommandClassName="BehaviorPortLinkReorientCommand">
- <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.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoConnectableEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- </links>
- <links visualID="4001" 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="4002" 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" 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="4003" 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" 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="4004" editPartClassName="ComponentRealizationEditPart" itemSemanticEditPolicyClassName="ComponentRealizationItemSemanticEditPolicy" createCommandClassName="ComponentRealizationCreateCommand" reorientCommandClassName="ComponentRealizationReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ComponentRealizationEditHelper"/>
- <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">
- <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ComponentRealization"/>
- <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="6001" editPartClassName="ComponentRealizationNameEditPart" itemSemanticEditPolicyClassName="ComponentRealizationNameItemSemanticEditPolicy">
- <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="6015" editPartClassName="ComponentRealizationAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="ComponentRealizationAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4005" 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.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/InterfaceRealization"/>
- <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="6002" 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.0">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6016" editPartClassName="InterfaceRealizationAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="InterfaceRealizationAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4011" 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.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.AppliedStereotypeSubstitutionLabelDisplayEditPolicy"/>
- <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/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="6003" 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.0">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6017" editPartClassName="SubstitutionAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="SubstitutionAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4006" 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">
- <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="6004" 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.0">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6018" 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="30"/>
- </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="4012" 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"/>
- <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/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="6005" 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" viewPattern="">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6019" editPartClassName="ManifestationAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="ManifestationAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4007" 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.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy"/>
- <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="6006" 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="60"/>
- </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 visualID="6020" editPartClassName="AbstractionAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="AbstractionAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4008" 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.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy"/>
- <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="6007" 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="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="6021" editPartClassName="UsageAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="UsageAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4009" 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"/>
- <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/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="6008" 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="6022" editPartClassName="DeploymentAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="DeploymentAppliedStereotypeItemSemanticEditPolicy" 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="30"/>
- </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="4017" editPartClassName="RoleBindingEditPart" itemSemanticEditPolicyClassName="RoleBindingItemSemanticEditPolicy" sourceReorientingAllowed="false" createCommandClassName="RoleBindingCreateCommand" reorientCommandClassName="RoleBindingReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.RoleBinding_4017" displayName="RoleBinding" editHelperClassName="RoleBindingEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.RoleBindingFigure"/>
- <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.4">
- <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"/>
- <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="6027" editPartClassName="RoleBindingRoleNameEditPart" itemSemanticEditPolicyClassName="RoleBindingRoleNameItemSemanticEditPolicy" readOnly="true" alignment="SOURCE">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getRoleLabel" 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">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6028" editPartClassName="RoleBindingAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="RoleBindingAppliedStereotypeItemSemanticEditPolicy" 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.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>
- <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.5" targetEnd="/0/@expressionProviders/@providers.0/@expressions.6"/>
- </links>
- <links visualID="4010" 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.3">
- <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="6009" 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="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="6023" 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="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="4013" editPartClassName="ConnectorEditPart" itemSemanticEditPolicyClassName="ConnectorItemSemanticEditPolicy" createCommandClassName="ConnectorCreateCommand" reorientCommandClassName="ConnectorReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:MetamodelType" editHelperClassName="ConnectorEditHelper"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ConnectorFigure"/>
- <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/Connector"/>
- <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedConnector"/>
- <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedConnector"/>
- <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/Connector/end"/>
- <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Connector/end"/>
- </modelFacet>
- <labels visualID="6025" editPartClassName="ConnectorAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="ConnectorAppliedStereotypeItemSemanticEditPolicy" 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.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>
- <labels visualID="6050" editPartClassName="ConnectorNameEditPart" itemSemanticEditPolicyClassName="ConnectorNameItemSemanticEditPolicy" elementIcon="true">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="-20"/>
- </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 visualID="6051" editPartClassName="ConnectorMultiplicitySourceEditPart" itemSemanticEditPolicyClassName="ConnectorMultiplicitySourceItemSemanticEditPolicy" 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>
- <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="sourceMul{0}" editorPattern="sourceMul{0}" editPattern="sourceMul{0}">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels visualID="6052" editPartClassName="ConnectorMultiplicityTargetEditPart" itemSemanticEditPolicyClassName="ConnectorMultiplicityTargetItemSemanticEditPolicy" readOnly="true" alignment="TARGET">
- <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>
- <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="targetMul{0}" editorPattern="targetMul{0}" editPattern="targetMul{0}">
- <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links visualID="4015" 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="6024" 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.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="4018" editPartClassName="TimeObservationEventEditPart" itemSemanticEditPolicyClassName="TimeObservationEventSemanticEditPolicy" createCommandClassName="TimeObservationEventCreateCommand" reorientCommandClassName="TimeObservationEventReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:SpecializationType" displayName="TimeObservationEvent"/>
- <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="4019" editPartClassName="DurationObservationEventEditPart" itemSemanticEditPolicyClassName="DurationObservationEventItemSemanticEditPolicy" createCommandClassName="DurationObservationEventCreateCommand" reorientCommandClassName="DurationObservationEventReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:SpecializationType" displayName="DurationObservationEvent"/>
- <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="4020" editPartClassName="RepresentationEditPart" itemSemanticEditPolicyClassName="RepresentationItemSemanticEditPolicy" createCommandClassName="RepresentationCreateCommand" reorientCommandClassName="RepresentationReorientCommand">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType xsi:type="gmfgen:SpecializationType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.RepresentationFigure">
- <attributes xsi:type="gmfgen:ColorAttributes" foregroundColor="black"/>
- </viewmap>
- <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem/represented"/>
- </modelFacet>
- <labels visualID="6030" editPartClassName="RepresentationTagLabelEditPart" itemSemanticEditPolicyClassName="RepresentationTagLabelItemSemanticEditPolicy">
- <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getTagLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="15"/>
- </viewmap>
- </labels>
- <creationConstraints targetEnd="/0/@expressionProviders/@providers.0/@expressions.8"/>
- </links>
- <links visualID="4021" editPartClassName="InformationFlowEditPart" itemSemanticEditPolicyClassName="InformationFlowItemSemanticEditPolicy" createCommandClassName="InformationFlowCreateCommand" reorientCommandClassName="InformationFlowReorientCommand">
- <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.composite.custom.figures.InformationFlowFigure"/>
- <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.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="6031" 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.uml.diagram.composite.custom.edit.policies.AbstractCustomLabelEditPolicy.SPECIFIC_NAME_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.InformationFlowCustomLabelEditPolicy"/>
- </labels>
- <labels visualID="6032" 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>
- <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>
- <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.9" targetEnd="/0/@expressionProviders/@providers.0/@expressions.10"/>
- </links>
- <compartments visualID="7033" editPartClassName="DataTypeAttributeCompartmentEditPart" itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.34" title="attributes" node="/0/@diagram/@topLevelNodes.15">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7034" editPartClassName="DataTypeOperationCompartmentEditPart" itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.35" title="operations" node="/0/@diagram/@topLevelNodes.15">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7036" editPartClassName="DataTypeAttributeCompartmentEditPartCN" itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.34" title="attributes" node="/0/@diagram/@childNodes.21">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7037" editPartClassName="DataTypeOperationCompartmentEditPartCN" itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.35" title="operations" node="/0/@diagram/@childNodes.21">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7048" editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart" itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.36" title="literals" node="/0/@diagram/@topLevelNodes.14">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7049" editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN" itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.36" title="literals" node="/0/@diagram/@childNodes.20">
- <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;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7050" editPartClassName="ActivityCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ActivityCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ActivityCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@childNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7051" editPartClassName="InteractionCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="InteractionCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InteractionCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7052" editPartClassName="ProtocolStateMachineCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ProtocolStateMachineCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7053" editPartClassName="StateMachineCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="StateMachineCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="StateMachineCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7054" editPartClassName="FunctionBehaviorCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="FunctionBehaviorCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7055" editPartClassName="OpaqueBehaviorCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="OpaqueBehaviorCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7056" editPartClassName="ComponentCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@childNodes.12" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7057" editPartClassName="DeviceCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@childNodes.13" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7058" editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@childNodes.14" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7059" editPartClassName="NodeCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@childNodes.15" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7060" editPartClassName="ClassCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ClassCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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.0" title="internal structure" node="/0/@diagram/@childNodes.16" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7061" editPartClassName="CollaborationCompositeCompartmentEditPartCN" itemSemanticEditPolicyClassName="CollaborationCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CollaborationCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33" title="internal structure" node="/0/@diagram/@childNodes.17" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.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.composite.custom.edit.policies.CustomCollaborationCompositeCompartmentItemSemanticEditPolicy"/>
- <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.composite.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="7063" editPartClassName="ActivityCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="ActivityCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ActivityCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7064" editPartClassName="InteractionCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="InteractionCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InteractionCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7065" editPartClassName="ProtocolStateMachineCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ProtocolStateMachineCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7066" editPartClassName="StateMachineCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="StateMachineCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="StateMachineCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" node="/0/@diagram/@topLevelNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7067" editPartClassName="FunctionBehaviorCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="FunctionBehaviorCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7068" editPartClassName="OpaqueBehaviorCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="OpaqueBehaviorCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7069" editPartClassName="ComponentCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7070" editPartClassName="DeviceCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7071" editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7072" editPartClassName="NodeCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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" title="internal structure" 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="getCompositeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7073" editPartClassName="ClassCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="ClassCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32" title="internal structure" node="/0/@diagram/@topLevelNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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="7075" editPartClassName="CollaborationCompositeCompartmentEditPart" itemSemanticEditPolicyClassName="CollaborationCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="CollaborationCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33" title="internal structure" node="/0/@diagram/@topLevelNodes.11" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.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.composite.custom.edit.policies.CustomCollaborationCompositeCompartmentItemSemanticEditPolicy"/>
- <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.composite.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="7077" editPartClassName="PropertyPartCompartmentEditPartCN" itemSemanticEditPolicyClassName="PropertyPartCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PropertyPartCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.28" title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.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.composite.custom.edit.policies.CustomPropertyPartCompartmentItemSemanticEditPolicyCN"/>
- <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy"/>
- <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;composite.group.nodes&quot;">
- <entries xsi:type="gmfgen:ToolEntry" title="Class" description="Create 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" createMethodName="createClassCreationTool" id="&quot;composite.tool.class&quot;" genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Property" description="Create 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" createMethodName="createPropertyCreationTool" id="&quot;composite.tool.property&quot;" genNodes="/0/@diagram/@childNodes.3"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Port" description="Create new Port" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif" createMethodName="createPortCreationTool" id="&quot;composite.tool.port&quot;" genNodes="/0/@diagram/@childNodes.1"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Collaboration" description="Create new Collaboration" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif" createMethodName="createCollaborationCreationTool" id="&quot;composite.tool.collaboration&quot;" genNodes="/0/@diagram/@childNodes.17 /0/@diagram/@topLevelNodes.11"/>
- <entries xsi:type="gmfgen:ToolEntry" title="CollaborationRole" description="Create new CollaborationRole" largeIconPath="icons/obj16/CollaborationRole.gif" smallIconPath="icons/obj16/CollaborationRole.gif" createMethodName="createCollaborationRoleCreationTool" id="&quot;composite.tool.collaborationrole&quot;" genNodes="/0/@diagram/@childNodes.4"/>
- <entries xsi:type="gmfgen:ToolEntry" title="CollaborationUse" description="Create new CollaborationUse" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif" createMethodName="createCollaborationUseCreationTool" id="&quot;composite.tool.collaborationuse&quot;" genNodes="/0/@diagram/@childNodes.5"/>
- <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;composite.tool.comment&quot;" genNodes="/0/@diagram/@childNodes.28 /0/@diagram/@topLevelNodes.43"/>
- <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;composite.tool.constraint&quot;" genNodes="/0/@diagram/@topLevelNodes.48 /0/@diagram/@childNodes.33"/>
- <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="createTimeObservationCreationTool" id="&quot;composite.tool.timeobservation&quot;" genNodes="/0/@diagram/@topLevelNodes.28"/>
- <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" createMethodName="createDurationObservationCreationTool" id="&quot;composite.tool.durationobservation&quot;" genNodes="/0/@diagram/@topLevelNodes.27"/>
- <entries xsi:type="gmfgen:ToolEntry" title="InformationItem" description="Create new 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" createMethodName="createInformationItemCreationTool" id="&quot;composite.tool.informationitem&quot;" genNodes="/0/@diagram/@childNodes.25 /0/@diagram/@topLevelNodes.19"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Parameter" description="Create new Parameter" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif" createMethodName="createParameterCreationTool" id="&quot;composite.tool.parameter&quot;" genNodes="/0/@diagram/@childNodes.2"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Activity" description="Create new 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" createMethodName="createActivityCreationTool" id="&quot;composite.tool.activity&quot;" genNodes="/0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Interaction" description="Create new Interaction" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif" createMethodName="createInteractionCreationTool" id="&quot;composite.tool.interaction&quot;" genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.1"/>
- <entries xsi:type="gmfgen:ToolEntry" title="ProtocolStateMachine" description="Create new ProtocolStateMachine" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif" createMethodName="createProtocolStateMachineCreationTool" id="&quot;composite.tool.protocolstatemachine&quot;" genNodes="/0/@diagram/@childNodes.8 /0/@diagram/@topLevelNodes.2"/>
- <entries xsi:type="gmfgen:ToolEntry" title="StateMachine" description="Create new StateMachine" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif" createMethodName="createStateMachineCreationTool" id="&quot;composite.tool.statemachine&quot;" genNodes="/0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.3"/>
- <entries xsi:type="gmfgen:ToolEntry" title="FunctionBehavior" description="Create new FunctionBehavior" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif" createMethodName="createFunctionBehaviorCreationTool" id="&quot;composite.tool.functionbehavior&quot;" genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@topLevelNodes.4"/>
- <entries xsi:type="gmfgen:ToolEntry" title="OpaqueBehavior" description="Create new OpaqueBehavior" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif" createMethodName="createOpaqueBehaviorCreationTool" id="&quot;composite.tool.opaquebehavior&quot;" genNodes="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5"/>
- </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" createMethodName="createEdgesGroup" id="&quot;composite.group.edges&quot;">
- <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;composite.tool.link&quot;" genLinks="/0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.16 /0/@diagram/@links.17"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Connector" description="Create new Connector" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif" createMethodName="createConnectorCreationTool" id="&quot;composite.tool.connector&quot;" genLinks="/0/@diagram/@links.14"/>
- <entries xsi:type="gmfgen:ToolEntry" title="RoleBinding" description="Create new RoleBinding" largeIconPath="icons/obj16/CollaborationRoleBinding.gif" smallIconPath="icons/obj16/CollaborationRoleBinding.gif" createMethodName="createRoleBindingCreationTool" id="&quot;composite.tool.rolebinding&quot;" genLinks="/0/@diagram/@links.12"/>
- <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;composite.tool.generalization&quot;" genLinks="/0/@diagram/@links.15"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Realization" description="Create new 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" createMethodName="createRealizationCreationTool" id="&quot;composite.tool.realization&quot;" genLinks="/0/@diagram/@links.7"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Substitution" description="Create new 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" createMethodName="createSubstitutionCreationTool" id="&quot;composite.tool.substitution&quot;" genLinks="/0/@diagram/@links.6"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Abstraction" description="Create new 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" createMethodName="createAbstractionCreationTool" id="&quot;composite.tool.abstraction&quot;" genLinks="/0/@diagram/@links.9"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Usage" description="Create new 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" createMethodName="createUsageCreationTool" id="&quot;composite.tool.usage&quot;" genLinks="/0/@diagram/@links.10"/>
- <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;composite.tool.dependency&quot;" genLinks="/0/@diagram/@links.13"/>
- <entries xsi:type="gmfgen:ToolEntry" title="Representation" description="Create new representation for an InformationItem" largeIconPath="icons/obj16/Representation.gif" smallIconPath="icons/obj16/Representation.gif" createMethodName="createRepresentationCreationTool" id="&quot;composite.tool.representation&quot;" genLinks="/0/@diagram/@links.18"/>
- <entries xsi:type="gmfgen:ToolEntry" title="InformationFlow" description="Create new InformationFlow" 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="createInformationFlowCreationTool" id="&quot;composite.tool.informationflow&quot;" genLinks="/0/@diagram/@links.19"/>
- </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.composite" name="Papyrus Composite Structure 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/>
- <diagramUpdater nodeDescriptorClassName="UMLNodeDescriptor"/>
- <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="return it.getBody();"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// Property / CollaborationRole constraint&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;// Restriction for the case where domainElement owner is a Collaboration&#xD;&#xA;&#x9;&#x9;// If the domainElement is not referenced as one of its owner role&#xD;&#xA;&#x9;&#x9;// then it should be considered as a Property creation on Collaboration,&#xD;&#xA;&#x9;&#x9;// else the test should return false and be considered as a representation of&#xD;&#xA;&#x9;&#x9;// a collaboration role (ConnectableElement).&#xD;&#xA;&#x9;&#x9;if (containerView.getElement() instanceof org.eclipse.uml2.uml.Collaboration) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.Collaboration graphicalParent = (org.eclipse.uml2.uml.Collaboration) containerView.getElement();&#xD;&#xA;&#x9;&#x9;&#x9;if (graphicalParent.getCollaborationRoles().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;// General case : no restriction&#xD;&#xA;&#x9;&#x9;return true;"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// Test if the dependency is not a RoleBinding&#xD;&#xA;&#x9;&#x9;if (domainElement.getOwner() instanceof org.eclipse.uml2.uml.CollaborationUse) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.CollaborationUse owner = (org.eclipse.uml2.uml.CollaborationUse) domainElement.getOwner();&#xD;&#xA;&#x9;&#x9;&#x9;if (owner.getRoleBindings().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return true;"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// Test if the dependency is a RoleBinding&#xD;&#xA;&#x9;&#x9;if (domainElement.getOwner() instanceof org.eclipse.uml2.uml.CollaborationUse) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.CollaborationUse owner = (org.eclipse.uml2.uml.CollaborationUse) domainElement.getOwner();&#xD;&#xA;&#x9;&#x9;&#x9;if (owner.getRoleBindings().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// RoleBinding source constraint&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; !(source instanceof org.eclipse.uml2.uml.CollaborationUse)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;// RoleBinding source has a type&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; (((org.eclipse.uml2.uml.CollaborationUse) source).getType() == null)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// RoleBinding target constraint&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((target != null) &amp;&amp; !(target instanceof org.eclipse.uml2.uml.ConnectableElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;// RoleBinding source and target have the same semantic parent&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; (target != null) &amp;&amp; (source.getOwner() != target.getOwner())) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
- <expressions body="// InformationItem is Abstract&#xD;&#xA;return true;"/>
- <expressions xsi:type="gmfgen:GenConstraint" body="// Represented InformationItem Target&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if (target != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((target instanceof org.eclipse.uml2.uml.Class)&#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.InformationItem)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Signal) || &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;(target instanceof org.eclipse.uml2.uml.Component))) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
- <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;}"/>
- <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;"/>
- <expressions body="// Comment body init&#xD;&#xA;return &quot;&quot;;"/>
- <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="// IntervalConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.Interval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createInterval();&#xD;&#xA;return value;"/>
- <expressions body="// DurationConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.DurationInterval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createDurationInterval();&#xD;&#xA;return value;"/>
- <expressions body="// TimeConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.TimeInterval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createTimeInterval();&#xD;&#xA;return value;"/>
- </providers>
- <providers xsi:type="gmfgen:GenLiteralExpressionProvider">
- <expressions body="org.eclipse.uml2.uml.AggregationKind.COMPOSITE_LITERAL"/>
- </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/@topLevelNodes.2/@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.13/@labels.0/@modelFacet /0/@diagram/@childNodes.36/@labelModelFacet /0/@diagram/@topLevelNodes.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.15/@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/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@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.19/@labels.0/@modelFacet /0/@diagram/@childNodes.20/@labels.0/@modelFacet /0/@diagram/@childNodes.21/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@childNodes.17/@labels.0/@modelFacet /0/@diagram/@childNodes.22/@labels.0/@modelFacet /0/@diagram/@childNodes.23/@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.18/@labels.0/@modelFacet /0/@diagram/@childNodes.16/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.34/@labelModelFacet /0/@diagram/@childNodes.35/@labelModelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.16/@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/@topLevelNodes.20/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.21/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.22/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.23/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.24/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.25/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.26/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.29/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.30/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.31/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.32/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.33/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.34/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.35/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.36/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.37/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.38/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.39/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.40/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.41/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.42/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.44/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.45/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.46/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.47/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.48/@labels.0/@modelFacet /0/@diagram/@links.4/@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.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@links.11/@labels.0/@modelFacet /0/@diagram/@links.13/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.28/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@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.32/@labels.0/@modelFacet /0/@diagram/@links.14/@labels.1/@modelFacet /0/@diagram/@links.14/@labels.2/@modelFacet /0/@diagram/@links.14/@labels.3/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@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 /0/@diagram/@childNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.15/@labels.1/@modelFacet /0/@diagram/@childNodes.16/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.1/@modelFacet /0/@diagram/@childNodes.18/@labels.1/@modelFacet /0/@diagram/@childNodes.19/@labels.1/@modelFacet /0/@diagram/@childNodes.20/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.1/@modelFacet /0/@diagram/@childNodes.22/@labels.1/@modelFacet /0/@diagram/@childNodes.23/@labels.1/@modelFacet /0/@diagram/@childNodes.24/@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/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.13/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.14/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.15/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.16/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.19/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.20/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.21/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.22/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.23/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.24/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.25/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.26/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.29/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.30/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.31/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.32/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.33/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.34/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.35/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.36/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.37/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.38/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.39/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.40/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.41/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.42/@labels.1/@modelFacet"/>
- <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@links.4/@labels.1/@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.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.10/@labels.1/@modelFacet /0/@diagram/@links.11/@labels.1/@modelFacet /0/@diagram/@links.13/@labels.1/@modelFacet /0/@diagram/@links.15/@labels.0/@modelFacet /0/@diagram/@links.14/@labels.0/@modelFacet /0/@diagram/@links.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.28/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.27/@labels.1/@modelFacet /0/@diagram/@childNodes.1/@labels.1/@modelFacet /0/@diagram/@links.19/@labels.1/@modelFacet /0/@diagram/@childNodes.2/@labels.1/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@links.12/@labels.0/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.composite.custom.parsers.RoleBindingRoleNameParser"/>
- <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@topLevelNodes.43/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@topLevelNodes.44/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.45/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.46/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.47/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.48/@labels.1/@modelFacet /0/@diagram/@childNodes.29/@labels.1/@modelFacet /0/@diagram/@childNodes.30/@labels.1/@modelFacet /0/@diagram/@childNodes.31/@labels.1/@modelFacet /0/@diagram/@childNodes.33/@labels.1/@modelFacet /0/@diagram/@childNodes.32/@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="Add super class to a selected set of generated EditParts" genView="/0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.19 /0/@diagram/@topLevelNodes.20 /0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.21 /0/@diagram/@topLevelNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@topLevelNodes.14 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.18 /0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@topLevelNodes.19 /0/@diagram/@childNodes.25" name="EP_NamedElement_NODE" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
- <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.11 /0/@diagram/@links.13 /0/@diagram/@links.15 /0/@diagram/@links.14 /0/@diagram/@links.12 /0/@diagram/@links.19 /0/@diagram/@links.18 /0/@diagram/@links.3" name="EP_NamedElement_EDGE" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Adds a superclass for DurationObservationEditPart, TimeObservationEditPart" genView="/0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.27" name="EP_Observation_NODE" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Manages stereotype shown with External Label" genView="/0/@diagram/@topLevelNodes.28/@labels.1 /0/@diagram/@topLevelNodes.27/@labels.1 /0/@diagram/@childNodes.1/@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/@topLevelNodes.43 /0/@diagram/@childNodes.28" 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/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33" name="EP_Constraint_NODE" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:SpecificLocator" comment="Affixed Port locator" classpath="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator" genChildSideAffixedNode="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel" comment="External node label locator" classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator" genExternalNodeLabel="/0/@diagram/@topLevelNodes.27/@labels.1 /0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@topLevelNodes.28/@labels.1"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater" comment="Property (Part) custom DiagramUpdater" classpath="org.eclipse.papyrus.uml.diagram.composite.custom.parts.PropertyDiagramUpdater" genNode="/0/@diagram/@childNodes.3"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater" comment="Property (Part) compartment custom DiagramUpdater" classpath="org.eclipse.papyrus.uml.diagram.composite.custom.parts.PropertyDiagramUpdater" genNode="/0/@diagram/@compartments.30"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:GenNodeConstraint" comment="Creation constraint for TopLevelNode in virtual canvas" genNode="/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.10 /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/@topLevelNodes.20 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26 /0/@diagram/@topLevelNodes.27 /0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@topLevelNodes.43 /0/@diagram/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48" genConstraint="/0/@expressionProviders/@providers.0/@expressions.11"/>
- <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/@childNodes.1 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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/@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.10 /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/@topLevelNodes.20 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26 /0/@diagram/@topLevelNodes.27 /0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@topLevelNodes.43 /0/@diagram/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48 /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"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:EditPartUsingReorientService" comment="Use the edit service for reorient command (All DirectedRelationship)" name="DirectedRelationship" genView="/0/@diagram/@links.15 /0/@diagram/@links.19 /0/@diagram/@links.13 /0/@diagram/@links.11 /0/@diagram/@links.10 /0/@diagram/@links.9 /0/@diagram/@links.8 /0/@diagram/@links.7 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:EditPartUsingReorientService" comment="Use the edit service for reorient command (Connector)" name="Connector" genView="/0/@diagram/@links.14"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="this is an abstract class for BehaviorPortEditPart" genView="/0/@diagram/@childNodes.0" name="AbstractBehaviorPortEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.composite.custom.edit.parts.AbstractBehaviorPortEditPart"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="add superclass for floating Label" genView="/0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.0/@labels.0 /0/@diagram/@childNodes.2/@labels.0 /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 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.16/@labels.1 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.24/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.9/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.14/@labels.1 /0/@diagram/@topLevelNodes.15/@labels.1 /0/@diagram/@topLevelNodes.16/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.19/@labels.1 /0/@diagram/@topLevelNodes.20/@labels.1 /0/@diagram/@topLevelNodes.21/@labels.1 /0/@diagram/@topLevelNodes.22/@labels.1 /0/@diagram/@topLevelNodes.23/@labels.1 /0/@diagram/@topLevelNodes.24/@labels.1 /0/@diagram/@topLevelNodes.25/@labels.1 /0/@diagram/@topLevelNodes.26/@labels.1 /0/@diagram/@topLevelNodes.29/@labels.1 /0/@diagram/@topLevelNodes.30/@labels.1 /0/@diagram/@topLevelNodes.31/@labels.1 /0/@diagram/@topLevelNodes.32/@labels.1 /0/@diagram/@topLevelNodes.33/@labels.1 /0/@diagram/@topLevelNodes.34/@labels.1 /0/@diagram/@topLevelNodes.35/@labels.1 /0/@diagram/@topLevelNodes.36/@labels.1 /0/@diagram/@topLevelNodes.37/@labels.1 /0/@diagram/@topLevelNodes.38/@labels.1 /0/@diagram/@topLevelNodes.39/@labels.1 /0/@diagram/@topLevelNodes.40/@labels.1 /0/@diagram/@topLevelNodes.41/@labels.1 /0/@diagram/@topLevelNodes.42/@labels.1 /0/@diagram/@topLevelNodes.27/@labels.0 /0/@diagram/@topLevelNodes.28/@labels.0" name="FloatingLabelEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
- <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.1/@labels.0 /0/@diagram/@childNodes.2/@labels.0 /0/@diagram/@topLevelNodes.27/@labels.0 /0/@diagram/@topLevelNodes.28/@labels.0 /0/@diagram/@childNodes.0/@labels.0 /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 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.16/@labels.1 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.24/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.9/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.14/@labels.1 /0/@diagram/@topLevelNodes.15/@labels.1 /0/@diagram/@topLevelNodes.16/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.19/@labels.1 /0/@diagram/@topLevelNodes.20/@labels.1 /0/@diagram/@topLevelNodes.21/@labels.1 /0/@diagram/@topLevelNodes.22/@labels.1 /0/@diagram/@topLevelNodes.23/@labels.1 /0/@diagram/@topLevelNodes.24/@labels.1 /0/@diagram/@topLevelNodes.25/@labels.1 /0/@diagram/@topLevelNodes.26/@labels.1 /0/@diagram/@topLevelNodes.29/@labels.1 /0/@diagram/@topLevelNodes.30/@labels.1 /0/@diagram/@topLevelNodes.31/@labels.1 /0/@diagram/@topLevelNodes.32/@labels.1 /0/@diagram/@topLevelNodes.33/@labels.1 /0/@diagram/@topLevelNodes.34/@labels.1 /0/@diagram/@topLevelNodes.35/@labels.1 /0/@diagram/@topLevelNodes.36/@labels.1 /0/@diagram/@topLevelNodes.37/@labels.1 /0/@diagram/@topLevelNodes.38/@labels.1 /0/@diagram/@topLevelNodes.39/@labels.1 /0/@diagram/@topLevelNodes.40/@labels.1 /0/@diagram/@topLevelNodes.41/@labels.1 /0/@diagram/@topLevelNodes.42/@labels.1"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" genView="/0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@childNodes.23 /0/@diagram/@topLevelNodes.17 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.27 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26" name="RoundedCompartmentEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
- <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="extend view for affixed node" genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" name="RoundedBorderNamedElementEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
+<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.composite"
+ modelID="CompositeStructure" diagramFileExtension="uml_csd"
+ domainFileExtension="uml" 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="CompositeStructureDiagramEditPart"
+ itemSemanticEditPolicyClassName="CompositeStructureDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CompositeStructureDiagramCanonicalEditPolicy"
+ iconProviderPriority="Low" baseEditHelperClassName="UMLBaseEditHelper"
+ creationWizardIconPath="icons/obj16/Diagram_CompositeStructure.gif"
+ validationProviderPriority="Low" validationEnabled="true"
+ validationDecorators="true" liveValidationUIFeedback="true"
+ synchronized="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram" />
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="CompositeStructureDiagram"
+ definedExternally="true" editHelperClassName="PackageEditHelper" />
+ <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.composite.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package" />
+ <childNodes visualID="3121" editPartClassName="BehaviorPortEditPart"
+ itemSemanticEditPolicyClassName="BehaviorPortItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="BehaviorPortCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="BehaviorPortGraphicalNodeEditPolicy"
+ createCommandClassName="BehaviorPortCreateCommand" containers="/0/@diagram/@compartments.16">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:NotationType"
+ definedExternally="true" />
+ <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.composite.custom.edit.policies.BehaviorSymbolEditPolicy.BEHAVIOR_SYMBOL"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorSymbolEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoConnectableEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy" />
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="6053"
+ editPartClassName="BehaviorPortFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
+ <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 xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3069" editPartClassName="PortEditPart"
+ itemSemanticEditPolicyClassName="PortItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PortCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PortGraphicalNodeEditPolicy"
+ createCommandClassName="PortCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="PortEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.PortFigure">
+ <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.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortLayoutEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy.BEHAVIOR_PORT"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy" />
+ <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.MaskManagedNodeEditPolicy" />
+ <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/Port" />
+ <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>
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property/aggregation" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5125"
+ editPartClassName="PortNameEditPart"
+ itemSemanticEditPolicyClassName="PortNameItemSemanticEditPolicy"
+ 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="25"
+ y="3" />
+ </viewmap>
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPortLabelEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy" />
+ <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="6029"
+ editPartClassName="PortAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PortAppliedStereotypeItemSemanticEditPolicy"
+ 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="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="&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 xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3088" editPartClassName="ParameterEditPart"
+ itemSemanticEditPolicyClassName="ParameterItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ParameterGraphicalNodeEditPolicy"
+ createCommandClassName="ParameterCreateCommand"
+ containers="/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/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.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.composite.Parameter_3088"
+ displayName="Parameter" definedExternally="true"
+ editHelperClassName="ParameterEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ParameterFigure">
+ <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.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.ParameterLayoutEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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/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.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="6033"
+ editPartClassName="ParameterNameEditPart"
+ itemSemanticEditPolicyClassName="ParameterNameItemSemanticEditPolicy"
+ 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="25"
+ y="3" />
+ </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.composite.custom.edit.policies.ParameterLabelEditPolicy" />
+ <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="6034"
+ editPartClassName="ParameterAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ParameterAppliedStereotypeItemSemanticEditPolicy"
+ 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="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="&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="3070" editPartClassName="PropertyPartEditPartCN"
+ itemSemanticEditPolicyClassName="PropertyPartItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PropertyPartCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.30"
+ graphicalNodeEditPolicyClassName="PropertyPartGraphicalNodeEditPolicyCN"
+ createCommandClassName="PropertyPartCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.PropertyPartFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.PropertyLayoutEditPolicy" />
+ <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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy" />
+ <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.MaskManagedNodeEditPolicy" />
+ <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.2">
+ <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>
+ <labels visualID="5126" editPartClassName="PropertyPartNameEditPartCN"
+ itemSemanticEditPolicyClassName="PropertyPartNameItemSemanticEditPolicyCN"
+ 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.IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPropertyLabelEditPolicy" />
+ <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="6054"
+ editPartClassName="PropertyPartFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="PropertyFloatingLabelItemSemanticEditPolicy">
+ <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="3115" editPartClassName="CollaborationRoleEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationRoleItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CollaborationRoleCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CollaborationRoleGraphicalNodeEditPolicyCN"
+ createCommandClassName="CollaborationRoleCreateCommandCN"
+ containers="/0/@diagram/@compartments.17 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.CollaborationRole_3115"
+ displayName="CollaborationRole" definedExternally="true"
+ editHelperClassName="CollaborationRoleEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationRoleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CollaborationRoleItemSemanticEditPolicy" />
+ <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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectableElement" />
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/role" />
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/role" />
+ <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="5198" editPartClassName="CollaborationRoleNameEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationRoleNameItemSemanticEditPolicyCN"
+ readOnly="true" 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" 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="6055"
+ editPartClassName="CollaborationRoleFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ConnectableElementFloatingLabelItemSemanticEditPolicy">
+ <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" editPartClassName="CollaborationUseEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationUseItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CollaborationUseCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CollaborationUseGraphicalNodeEditPolicyCN"
+ createCommandClassName="CollaborationUseCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="CollaborationUseEditHelper" />
+ <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.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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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/CollaborationUse" />
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/collaborationUse" />
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/collaborationUse" />
+ <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="5127" editPartClassName="CollaborationUseNameEditPart"
+ itemSemanticEditPolicyClassName="CollaborationUseNameItemSemanticEditPolicy"
+ 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.composite.custom.edit.policies.CollaborationUseLabelEditPolicy" />
+ <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="6056"
+ editPartClassName="CollaborationUseFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationUseFloatingLabelItemSemanticEditPolicy">
+ <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="3072" editPartClassName="ActivityCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ActivityCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.6"
+ graphicalNodeEditPolicyClassName="ActivityCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="ActivityCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.0/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/Activity" />
+ <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>
+ <labels visualID="5128" editPartClassName="ActivityCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6057"
+ editPartClassName="ActivityCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityFloatingLabelItemSemanticEditPolicy">
+ <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="3073" editPartClassName="InteractionCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InteractionCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.7"
+ graphicalNodeEditPolicyClassName="InteractionCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="InteractionCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.1/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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>
+ <labels visualID="5129" editPartClassName="InteractionCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6058"
+ editPartClassName="InteractionCompositeFloatingLabelEditPartCN"
+ 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" />
+ <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"
+ editPartClassName="ProtocolStateMachineCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ProtocolStateMachineCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.8"
+ graphicalNodeEditPolicyClassName="ProtocolStateMachineCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="ProtocolStateMachineCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.2/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/ProtocolStateMachine" />
+ <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>
+ <labels visualID="5130"
+ editPartClassName="ProtocolStateMachineCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6059"
+ editPartClassName="ProtocolStateMachineCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineFloatingLabelItemSemanticEditPolicy">
+ <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="3075" editPartClassName="StateMachineCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="StateMachineCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="StateMachineCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.9"
+ graphicalNodeEditPolicyClassName="StateMachineCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="StateMachineCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.3/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/StateMachine" />
+ <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>
+ <labels visualID="5131" editPartClassName="StateMachineCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="StateMachineCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6060"
+ editPartClassName="StateMachineCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="StateMachineFloatingLabelItemSemanticEditPolicy">
+ <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="3076" editPartClassName="FunctionBehaviorCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="FunctionBehaviorCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.10"
+ graphicalNodeEditPolicyClassName="FunctionBehaviorCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="FunctionBehaviorCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.4/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/FunctionBehavior" />
+ <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>
+ <labels visualID="5132" editPartClassName="FunctionBehaviorCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6061"
+ editPartClassName="FunctionBehaviorCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="FunctionBehaviorFloatingLabelItemSemanticEditPolicy">
+ <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="3077" editPartClassName="OpaqueBehaviorCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="OpaqueBehaviorCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.11"
+ graphicalNodeEditPolicyClassName="OpaqueBehaviorCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="OpaqueBehaviorCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.5/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/OpaqueBehavior" />
+ <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>
+ <labels visualID="5133" editPartClassName="OpaqueBehaviorCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6062"
+ editPartClassName="OpaqueBehaviorCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorFloatingLabelItemSemanticEditPolicy">
+ <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="3081" editPartClassName="ComponentCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.12"
+ graphicalNodeEditPolicyClassName="ComponentCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="ComponentCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.6/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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>
+ <labels visualID="5137" editPartClassName="ComponentCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6063"
+ editPartClassName="ComponentCompositeFloatingLabelEditPartCN"
+ 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="3082" editPartClassName="DeviceCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DeviceCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.13"
+ graphicalNodeEditPolicyClassName="DeviceCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="DeviceCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.7/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/Device" />
+ <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>
+ <labels visualID="5138" editPartClassName="DeviceCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6064"
+ editPartClassName="DeviceCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceFloatingLabelItemSemanticEditPolicy">
+ <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="3083"
+ editPartClassName="ExecutionEnvironmentCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.14"
+ graphicalNodeEditPolicyClassName="ExecutionEnvironmentCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="ExecutionEnvironmentCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.8/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/ExecutionEnvironment" />
+ <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>
+ <labels visualID="5139"
+ editPartClassName="ExecutionEnvironmentCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6065"
+ editPartClassName="ExecutionEnvironmentCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentFloatingLabelItemSemanticEditPolicy">
+ <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="3084" editPartClassName="NodeCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="NodeCompositeItemSemanticEditPolicycN"
+ canonicalEditPolicyClassName="NodeCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.15"
+ graphicalNodeEditPolicyClassName="NodeCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="NodeCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.9/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/Node" />
+ <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>
+ <labels visualID="5140" editPartClassName="NodeCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="NodeCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6066"
+ editPartClassName="NodeCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
+ <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="3085" editPartClassName="ClassCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="ClassCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassCompositeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.16"
+ graphicalNodeEditPolicyClassName="ClassCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="ClassCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.10/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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>
+ <labels visualID="5155" editPartClassName="ClassCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="ClassCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6067"
+ editPartClassName="ClassCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ClassFloatingLabelItemSemanticEditPolicy">
+ <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="3086" editPartClassName="CollaborationCompositeEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationCompositeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CollaborationCompositeCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.17"
+ graphicalNodeEditPolicyClassName="CollaborationCompositeGraphicalNodeEditPolicyCN"
+ createCommandClassName="CollaborationCompositeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="CollaborationEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure" />
+ <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.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/Collaboration" />
+ <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>
+ <labels visualID="5141" editPartClassName="CollaborationCompositeNameEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationCompositeNameItemSemanticEditPolicyCN"
+ 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" 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="6068"
+ editPartClassName="CollaborationCompositeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationFloatingLabelItemSemanticEditPolicy">
+ <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="3087" editPartClassName="InterfaceEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InterfaceCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicyCN"
+ createCommandClassName="InterfaceCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="InterfaceEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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>
+ <labels visualID="5154" 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.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="6069"
+ editPartClassName="InterfaceFloatingLabelEditPartCN"
+ 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="3078" editPartClassName="PrimitiveTypeEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN"
+ createCommandClassName="PrimitiveTypeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.13/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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>
+ <labels visualID="5134" 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.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="6070"
+ editPartClassName="PrimitiveTypeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeFloatingLabelItemSemanticEditPolicy">
+ <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" editPartClassName="EnumerationEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.36" compartments="/0/@diagram/@compartments.5"
+ graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN"
+ createCommandClassName="EnumerationCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.14/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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>
+ <labels visualID="5135" 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.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="6071"
+ editPartClassName="EnumerationFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationFloatingLabelItemSemanticEditPolicy">
+ <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="3080" editPartClassName="DataTypeEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3"
+ graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN"
+ createCommandClassName="DataTypeCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@topLevelNodes.15/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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>
+ <labels visualID="5136" 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.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="6072"
+ editPartClassName="DataTypeFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeFloatingLabelItemSemanticEditPolicy">
+ <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="3091" editPartClassName="ActorEditPartCN"
+ itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ActorCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicyCN"
+ createCommandClassName="ActorCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ActorEditHelper" />
+ <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.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>
+ <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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5144" editPartClassName="ActorNameEditPartCN"
+ itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicyCN"
+ 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" 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="6073"
+ editPartClassName="ActorFloatingLabelEditPartCN"
+ 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="3092" editPartClassName="DeploymentSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DeploymentSpecificationCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="DeploymentSpecificationGraphicalNodeEditPolicyCN"
+ createCommandClassName="DeploymentSpecificationCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="DeploymentSpecificationEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentSpecification" />
+ <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>
+ <labels visualID="5145" editPartClassName="DeploymentSpecificationNameEditPartCN"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationNameItemSemanticEditPolicyCN"
+ 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" 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="6074"
+ editPartClassName="DeploymentSpecificationFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationFloatingLabelItemSemanticEditPolicy">
+ <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="3093" editPartClassName="ArtifactEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyCN"
+ createCommandClassName="ArtifactCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ArtifactEditHelper" />
+ <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.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>
+ <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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5146" editPartClassName="ArtifactNameEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyCN"
+ 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" 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="6075"
+ 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" />
+ <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="3094" editPartClassName="InformationItemEditPartCN"
+ itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InformationItemCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicyCN"
+ createCommandClassName="InformationItemCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="InformationItemEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes"
+ width="80" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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/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>
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5147" 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.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="6076"
+ editPartClassName="InformationItemFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="InformationItemFloatingLabelItemSemanticEditPolicy">
+ <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="3095" editPartClassName="SignalEditPartCN"
+ itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="SignalCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicyCN"
+ createCommandClassName="SignalCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="SignalEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure" />
+ <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>
+ <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>
+ <labels visualID="5148" 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.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="6077"
+ editPartClassName="SignalFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="SignalFloatingLabelItemSemanticEditPolicy">
+ <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="3096" editPartClassName="UseCaseEditPartCN"
+ itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="UseCaseCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicyCN"
+ createCommandClassName="UseCaseCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /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.27 /0/@diagram/@compartments.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="UseCaseEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase" />
+ <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>
+ <labels visualID="5149" editPartClassName="UseCaseNameEditPartCN"
+ itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicyCN"
+ 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" 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="6078"
+ editPartClassName="UseCaseFloatingLabelEditPartCN"
+ 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="3097" editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
+ createCommandClassName="CommentCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ displayName="Comment" definedExternally="true" 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.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.12">
+ <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.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body" />
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="3116" editPartClassName="DurationConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="DurationConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DurationConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="DurationConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="DurationConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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/DurationConstraint" />
+ <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.15">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="6040" editPartClassName="DurationConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="DurationConstraintNameItemSemanticEditPolicyCN"
+ 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=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6041" editPartClassName="DurationConstraintSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="DurationConstraintSpecificationItemSemanticEditPolicyCN">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="3117" editPartClassName="TimeConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="TimeConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="TimeConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="TimeConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="TimeConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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/TimeConstraint" />
+ <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.16">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="6042" editPartClassName="TimeConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="TimeConstraintNameItemSemanticEditPolicyCN"
+ 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=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6043" editPartClassName="TimeConstraintSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="TimeConstraintSpecificationItemSemanticEditPolicyCN">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="3118" editPartClassName="IntervalConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="IntervalConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="IntervalConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="IntervalConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="IntervalConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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/IntervalConstraint" />
+ <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.14">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="6044" editPartClassName="IntervalConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="IntervalConstraintNameItemSemanticEditPolicyCN"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6045" editPartClassName="IntervalConstraintSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="IntervalConstraintSpecificationItemSemanticEditPolicyCN">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="3119" editPartClassName="InteractionConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InteractionConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="InteractionConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="InteractionConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.28 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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/InteractionConstraint" />
+ <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.13">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="6046" editPartClassName="InteractionConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionConstraintNameItemSemanticEditPolicyCN"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6047"
+ editPartClassName="InteractionConstraintSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionConstraintSpecificationItemSemanticEditPolicyCN">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="3120" editPartClassName="ConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="ConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.28 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /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.27 /0/@diagram/@compartments.29">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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.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.13">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="6048" 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6049" 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.4">
+ <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>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3101"
+ editPartClassName="PropertyEditPartCLN"
+ itemSemanticEditPolicyClassName="PropertyItemSemanticEditPolicyCLN"
+ canonicalEditPolicyClassName="PropertyCanonicalEditPolicyCLN"
+ graphicalNodeEditPolicyClassName="PropertyGraphicalNodeEditPolicyCLN"
+ createCommandClassName="PropertyCreateCommandCLN"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.0"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel" />
+ <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="{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="3102"
+ editPartClassName="OperationEditPartCLN"
+ itemSemanticEditPolicyClassName="OperationItemSemanticEditPolicyCLN"
+ canonicalEditPolicyClassName="OperationCanonicalEditPolicyCLN"
+ graphicalNodeEditPolicyClassName="OperationGraphicalNodeEditPolicyCLN"
+ createCommandClassName="OperationCreateCommandCLN"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.1"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel" />
+ <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" viewPattern="{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="3066"
+ editPartClassName="EnumerationLiteralEditPartCLN"
+ itemSemanticEditPolicyClassName="EnumerationLiteralItemSemanticEditPolicyCLN"
+ canonicalEditPolicyClassName="EnumerationLiteralCanonicalEditPolicyCLN"
+ graphicalNodeEditPolicyClassName="EnumerationLiteralGraphicalNodeEditPolicyCLN"
+ createCommandClassName="EnumerationLiteralCreateCommandCLN"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.4 /0/@diagram/@topLevelNodes.14 /0/@diagram/@childNodes.20"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="EnumerationLiteralEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel" />
+ <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.0" viewPattern="{0} "
+ editorPattern="{0}" editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </labelModelFacet>
+ </childNodes>
+ <topLevelNodes visualID="2060" editPartClassName="ActivityCompositeEditPart"
+ itemSemanticEditPolicyClassName="ActivityCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ActivityCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.18"
+ graphicalNodeEditPolicyClassName="ActivityCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="ActivityCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ActivityEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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="5112" editPartClassName="ActivityCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="ActivityCompositeNameItemSemanticEditPolicy"
+ 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" 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="6079"
+ editPartClassName="ActivityCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ActivityFloatingLabelItemSemanticEditPolicy">
+ <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="2061" editPartClassName="InteractionCompositeEditPart"
+ itemSemanticEditPolicyClassName="InteractionCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InteractionCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.19"
+ graphicalNodeEditPolicyClassName="InteractionCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="InteractionCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="InteractionEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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="5113" editPartClassName="InteractionCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="InteractionCompositeNameItemSemanticEditPolicy"
+ 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" 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="6080"
+ editPartClassName="InteractionCompositeFloatingLabelEditPart"
+ 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" />
+ <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="2062"
+ editPartClassName="ProtocolStateMachineCompositeEditPart"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ProtocolStateMachineCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.20"
+ graphicalNodeEditPolicyClassName="ProtocolStateMachineCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="ProtocolStateMachineCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ProtocolStateMachineEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/ProtocolStateMachine" />
+ <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="5114" editPartClassName="ProtocolStateMachineCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeNameItemSemanticEditPolicy"
+ 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" 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="6081"
+ editPartClassName="ProtocolStateMachineCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineFloatingLabelItemSemanticEditPolicy">
+ <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="2063" editPartClassName="StateMachineCompositeEditPart"
+ itemSemanticEditPolicyClassName="StateMachineCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateMachineCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.21"
+ graphicalNodeEditPolicyClassName="StateMachineCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="StateMachineCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="StateMachineEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5115" editPartClassName="StateMachineCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="StateMachineCompositeNameItemSemanticEditPolicy"
+ 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" 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="6082"
+ editPartClassName="StateMachineCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="StateMachineFloatingLabelItemSemanticEditPolicy">
+ <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="2064"
+ editPartClassName="FunctionBehaviorCompositeEditPart"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="FunctionBehaviorCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.22"
+ graphicalNodeEditPolicyClassName="FunctionBehaviorCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="FunctionBehaviorCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="FunctionBehaviorEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/FunctionBehavior" />
+ <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="5116" editPartClassName="FunctionBehaviorCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeNameItemSemanticEditPolicy"
+ 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" 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="6083"
+ editPartClassName="FunctionBehaviorCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="FunctionBehaviorFloatingLabelItemSemanticEditPolicy">
+ <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="2065"
+ editPartClassName="OpaqueBehaviorCompositeEditPart"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OpaqueBehaviorCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ compartments="/0/@diagram/@compartments.23"
+ graphicalNodeEditPolicyClassName="OpaqueBehaviorCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="OpaqueBehaviorCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="OpaqueBehaviorEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.BehaviorLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/OpaqueBehavior" />
+ <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="5117" editPartClassName="OpaqueBehaviorCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeNameItemSemanticEditPolicy"
+ 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" 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="6084"
+ editPartClassName="OpaqueBehaviorCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorFloatingLabelItemSemanticEditPolicy">
+ <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="2069" editPartClassName="ComponentCompositeEditPart"
+ itemSemanticEditPolicyClassName="ComponentCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.24"
+ graphicalNodeEditPolicyClassName="ComponentCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="ComponentCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ComponentEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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="5121" editPartClassName="ComponentCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentCompositeNameItemSemanticEditPolicy"
+ 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" 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="6085"
+ editPartClassName="ComponentCompositeFloatingLabelEditPart"
+ 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="2070" editPartClassName="DeviceCompositeEditPart"
+ itemSemanticEditPolicyClassName="DeviceCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DeviceCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.25"
+ graphicalNodeEditPolicyClassName="DeviceCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="DeviceCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="DeviceEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5122" editPartClassName="DeviceCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="DeviceCompositeNameItemSemanticEditPolicy"
+ 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" 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="6086"
+ editPartClassName="DeviceCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DeviceFloatingLabelItemSemanticEditPolicy">
+ <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="2071"
+ editPartClassName="ExecutionEnvironmentCompositeEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.26"
+ graphicalNodeEditPolicyClassName="ExecutionEnvironmentCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="ExecutionEnvironmentCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ExecutionEnvironmentEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5123" editPartClassName="ExecutionEnvironmentCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeNameItemSemanticEditPolicy"
+ 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" 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="6087"
+ editPartClassName="ExecutionEnvironmentCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentFloatingLabelItemSemanticEditPolicy">
+ <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="2072" editPartClassName="NodeCompositeEditPart"
+ itemSemanticEditPolicyClassName="NodeCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NodeCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.27"
+ graphicalNodeEditPolicyClassName="NodeCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="NodeCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="NodeEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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/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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5124" editPartClassName="NodeCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="NodeCompositeNameItemSemanticEditPolicy"
+ 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" 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="6088"
+ editPartClassName="NodeCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="NodeFloatingLabelItemSemanticEditPolicy">
+ <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="2073" editPartClassName="ClassCompositeEditPart"
+ itemSemanticEditPolicyClassName="ClassCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassCompositeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1" compartments="/0/@diagram/@compartments.28"
+ graphicalNodeEditPolicyClassName="ClassCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="ClassCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ClassEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy" />
+ <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.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.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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="5156" editPartClassName="ClassCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="ClassCompositeNameItemSemanticEditPolicy"
+ 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" 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="6089"
+ editPartClassName="ClassCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ClassFloatingLabelItemSemanticEditPolicy">
+ <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="2075"
+ editPartClassName="CollaborationCompositeEditPart"
+ itemSemanticEditPolicyClassName="CollaborationCompositeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CollaborationCompositeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.29"
+ graphicalNodeEditPolicyClassName="CollaborationCompositeGraphicalNodeEditPolicy"
+ createCommandClassName="CollaborationCompositeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.17/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure" />
+ <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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.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/Collaboration" />
+ <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="5158" editPartClassName="CollaborationCompositeNameEditPart"
+ itemSemanticEditPolicyClassName="CollaborationCompositeNameItemSemanticEditPolicy"
+ 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" 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="6090"
+ editPartClassName="CollaborationCompositeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="CollaborationFloatingLabelItemSemanticEditPolicy">
+ <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="2076" editPartClassName="InterfaceEditPart"
+ itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="InterfaceCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.18/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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="5159" 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.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="6091"
+ 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>
+ <topLevelNodes visualID="2066" editPartClassName="PrimitiveTypeEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicy"
+ createCommandClassName="PrimitiveTypeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="PrimitiveTypeEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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="5118" 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.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="6092"
+ editPartClassName="PrimitiveTypeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeFloatingLabelItemSemanticEditPolicy">
+ <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="2067" editPartClassName="EnumerationEditPart"
+ itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EnumerationCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.36" compartments="/0/@diagram/@compartments.4"
+ graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicy"
+ createCommandClassName="EnumerationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="EnumerationEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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="5119" 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.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="6093"
+ editPartClassName="EnumerationFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="EnumerationFloatingLabelItemSemanticEditPolicy">
+ <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="2068" editPartClassName="DataTypeEditPart"
+ itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1"
+ graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicy"
+ createCommandClassName="DataTypeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="DataTypeEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure" />
+ <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.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy" />
+ <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/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="5120" 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.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="6094"
+ editPartClassName="DataTypeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DataTypeFloatingLabelItemSemanticEditPolicy">
+ <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="2077" editPartClassName="ActorEditPart"
+ itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ActorCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicy"
+ createCommandClassName="ActorCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.22/@elementType" />
+ <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.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>
+ <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/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="5160" editPartClassName="ActorNameEditPart"
+ itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicy"
+ 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" 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="6095"
+ editPartClassName="ActorFloatingLabelEditPart"
+ 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="2078"
+ editPartClassName="DeploymentSpecificationEditPart"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DeploymentSpecificationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DeploymentSpecificationGraphicalNodeEditPolicy"
+ createCommandClassName="DeploymentSpecificationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.23/@elementType" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentSpecification" />
+ <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="DeploymentSpecificationNameEditPart"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationNameItemSemanticEditPolicy"
+ 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" 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="6096"
+ editPartClassName="DeploymentSpecificationFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DeploymentSpecificationFloatingLabelItemSemanticEditPolicy">
+ <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="2079" editPartClassName="ArtifactEditPart"
+ itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ArtifactCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicy"
+ createCommandClassName="ArtifactCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.24/@elementType" />
+ <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.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>
+ <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.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5162" editPartClassName="ArtifactNameEditPart"
+ itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicy"
+ 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" 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="6097"
+ 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" />
+ <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="2080" editPartClassName="InformationItemEditPart"
+ itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InformationItemCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicy"
+ createCommandClassName="InformationItemCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.25/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes"
+ width="80" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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>
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5163" 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.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="6098"
+ editPartClassName="InformationItemFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="InformationItemFloatingLabelItemSemanticEditPolicy">
+ <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="2081" editPartClassName="SignalEditPart"
+ itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SignalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicy"
+ createCommandClassName="SignalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.26/@elementType" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure" />
+ <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>
+ <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="5164" 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.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="6099"
+ editPartClassName="SignalFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="SignalFloatingLabelItemSemanticEditPolicy">
+ <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="2082" editPartClassName="UseCaseEditPart"
+ itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="UseCaseCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicy"
+ createCommandClassName="UseCaseCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.27/@elementType" />
+ <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.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>
+ <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/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="5165" editPartClassName="UseCaseNameEditPart"
+ itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicy"
+ 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" 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="6100"
+ editPartClassName="UseCaseFloatingLabelEditPart"
+ 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="2083" editPartClassName="SignalEventEditPart"
+ itemSemanticEditPolicyClassName="SignalEventItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SignalEventCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="SignalEventGraphicalNodeEditPolicy"
+ createCommandClassName="SignalEventCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="SignalEventEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SignalEvent" />
+ <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="5166" editPartClassName="SignalEventNameEditPart"
+ itemSemanticEditPolicyClassName="SignalEventNameItemSemanticEditPolicy"
+ 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" 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="6101"
+ editPartClassName="SignalEventFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="SignalEventFloatingLabelItemSemanticEditPolicy">
+ <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="2084" editPartClassName="CallEventEditPart"
+ itemSemanticEditPolicyClassName="CallEventItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CallEventCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CallEventGraphicalNodeEditPolicy"
+ createCommandClassName="CallEventCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="CallEventEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallEvent" />
+ <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="5167" editPartClassName="CallEventNameEditPart"
+ itemSemanticEditPolicyClassName="CallEventNameItemSemanticEditPolicy"
+ 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" 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="6102"
+ editPartClassName="CallEventFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="CallEventFloatingLabelItemSemanticEditPolicy">
+ <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="2085" editPartClassName="AnyReceiveEventEditPart"
+ itemSemanticEditPolicyClassName="AnyReceiveEventItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AnyReceiveEventCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AnyReceiveEventGraphicalNodeEditPolicy"
+ createCommandClassName="AnyReceiveEventCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="AnyReceiveEventEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AnyReceiveEvent" />
+ <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="5168" editPartClassName="AnyReceiveEventNameEditPart"
+ itemSemanticEditPolicyClassName="AnyReceiveEventNameItemSemanticEditPolicy"
+ 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" 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="6103"
+ editPartClassName="AnyReceiveEventFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="AnyReceiveEventFloatingLabelItemSemanticEditPolicy">
+ <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="2088" editPartClassName="ChangeEventEditPart"
+ itemSemanticEditPolicyClassName="ChangeEventItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ChangeEventCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ChangeEventGraphicalNodeEditPolicy"
+ createCommandClassName="ChangeEventCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ChangeEventEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ChangeEvent" />
+ <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="5171" editPartClassName="ChangeEventNameEditPart"
+ itemSemanticEditPolicyClassName="ChangeEventNameItemSemanticEditPolicy"
+ 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" 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="6104"
+ editPartClassName="ChangeEventFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ChangeEventFloatingLabelItemSemanticEditPolicy">
+ <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="2089" editPartClassName="TimeEventEditPart"
+ itemSemanticEditPolicyClassName="TimeEventItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TimeEventCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeEventGraphicalNodeEditPolicy"
+ createCommandClassName="TimeEventCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="TimeEventEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeEvent" />
+ <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="5172" editPartClassName="TimeEventNameEditPart"
+ itemSemanticEditPolicyClassName="TimeEventNameItemSemanticEditPolicy"
+ 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" 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="6105"
+ editPartClassName="TimeEventFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="TimeEventFloatingLabelItemSemanticEditPolicy">
+ <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="2093" 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"
+ definedExternally="true" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.ObservationLayoutEditPolicy" />
+ <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" />
+ <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="5151"
+ 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.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5152"
+ 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.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>
+ </topLevelNodes>
+ <topLevelNodes visualID="2094" 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"
+ definedExternally="true" 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" />
+ <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.composite.custom.edit.policies.ObservationLayoutEditPolicy" />
+ <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="5142"
+ 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.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="5143"
+ 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.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>
+ </topLevelNodes>
+ <topLevelNodes visualID="2095" editPartClassName="LiteralBooleanEditPart"
+ itemSemanticEditPolicyClassName="LiteralBooleanItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="LiteralBooleanCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LiteralBooleanGraphicalNodeEditPolicy"
+ createCommandClassName="LiteralBooleanCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="LiteralBooleanEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralBoolean" />
+ <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="5178" editPartClassName="LiteralBooleanNameEditPart"
+ itemSemanticEditPolicyClassName="LiteralBooleanNameItemSemanticEditPolicy"
+ 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" 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="6106"
+ editPartClassName="LiteralBooleanFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="LiteralBooleanFloatingLabelItemSemanticEditPolicy">
+ <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="2096" editPartClassName="LiteralIntegerEditPart"
+ itemSemanticEditPolicyClassName="LiteralIntegerItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="LiteralIntegerCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LiteralIntegerGraphicalNodeEditPolicy"
+ createCommandClassName="LiteralIntegerCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="LiteralIntegerEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralInteger" />
+ <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="5179" editPartClassName="LiteralIntegerNameEditPart"
+ itemSemanticEditPolicyClassName="LiteralIntegerNameItemSemanticEditPolicy"
+ 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" 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="6107"
+ editPartClassName="LiteralIntegerFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="LiteralIntegerFloatingLabelItemSemanticEditPolicy">
+ <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="2097" editPartClassName="LiteralNullEditPart"
+ itemSemanticEditPolicyClassName="LiteralNullItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="LiteralNullCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LiteralNullGraphicalNodeEditPolicy"
+ createCommandClassName="LiteralNullCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="LiteralNullEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralNull" />
+ <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="5180" editPartClassName="LiteralNullNameEditPart"
+ itemSemanticEditPolicyClassName="LiteralNullNameItemSemanticEditPolicy"
+ 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" 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="6108"
+ editPartClassName="LiteralNullFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="LiteralNullFloatingLabelItemSemanticEditPolicy">
+ <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="2098" editPartClassName="LiteralStringEditPart"
+ itemSemanticEditPolicyClassName="LiteralStringItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="LiteralStringCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LiteralStringGraphicalNodeEditPolicy"
+ createCommandClassName="LiteralStringCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="LiteralStringEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralString" />
+ <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="5181" editPartClassName="LiteralStringNameEditPart"
+ itemSemanticEditPolicyClassName="LiteralStringNameItemSemanticEditPolicy"
+ 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" 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="6109"
+ editPartClassName="LiteralStringFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="LiteralStringFloatingLabelItemSemanticEditPolicy">
+ <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="2099"
+ editPartClassName="LiteralUnlimitedNaturalEditPart"
+ itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="LiteralUnlimitedNaturalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LiteralUnlimitedNaturalGraphicalNodeEditPolicy"
+ createCommandClassName="LiteralUnlimitedNaturalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="LiteralUnlimitedNaturalEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralUnlimitedNatural" />
+ <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="5182" editPartClassName="LiteralUnlimitedNaturalNameEditPart"
+ itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalNameItemSemanticEditPolicy"
+ 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" 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="6110"
+ editPartClassName="LiteralUnlimitedNaturalFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="LiteralUnlimitedNaturalFloatingLabelItemSemanticEditPolicy">
+ <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="2100" editPartClassName="StringExpressionEditPart"
+ itemSemanticEditPolicyClassName="StringExpressionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StringExpressionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="StringExpressionGraphicalNodeEditPolicy"
+ createCommandClassName="StringExpressionCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="StringExpressionEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StringExpression" />
+ <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="5183" editPartClassName="StringExpressionNameEditPart"
+ itemSemanticEditPolicyClassName="StringExpressionNameItemSemanticEditPolicy"
+ 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" 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="6111"
+ editPartClassName="StringExpressionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="StringExpressionFloatingLabelItemSemanticEditPolicy">
+ <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="2101" editPartClassName="OpaqueExpressionEditPart"
+ itemSemanticEditPolicyClassName="OpaqueExpressionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OpaqueExpressionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OpaqueExpressionGraphicalNodeEditPolicy"
+ createCommandClassName="OpaqueExpressionCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="OpaqueExpressionEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression" />
+ <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="5184" editPartClassName="OpaqueExpressionNameEditPart"
+ itemSemanticEditPolicyClassName="OpaqueExpressionNameItemSemanticEditPolicy"
+ 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" 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="6112"
+ editPartClassName="OpaqueExpressionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="OpaqueExpressionFloatingLabelItemSemanticEditPolicy">
+ <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="2102" editPartClassName="TimeExpressionEditPart"
+ itemSemanticEditPolicyClassName="TimeExpressionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TimeExpressionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeExpressionGraphicalNodeEditPolicy"
+ createCommandClassName="TimeExpressionCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="TimeExpressionEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeExpression" />
+ <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="5185" editPartClassName="TimeExpressionNameEditPart"
+ itemSemanticEditPolicyClassName="TimeExpressionNameItemSemanticEditPolicy"
+ 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" 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="6113"
+ editPartClassName="TimeExpressionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="TimeExpressionFloatingLabelItemSemanticEditPolicy">
+ <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="2103" editPartClassName="ExpressionEditPart"
+ itemSemanticEditPolicyClassName="ExpressionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExpressionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExpressionGraphicalNodeEditPolicy"
+ createCommandClassName="ExpressionCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ExpressionEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Expression" />
+ <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="5186" editPartClassName="ExpressionNameEditPart"
+ itemSemanticEditPolicyClassName="ExpressionNameItemSemanticEditPolicy"
+ 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" 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="6114"
+ editPartClassName="ExpressionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ExpressionFloatingLabelItemSemanticEditPolicy">
+ <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="2104" editPartClassName="DurationEditPart"
+ itemSemanticEditPolicyClassName="DurationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DurationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationGraphicalNodeEditPolicy"
+ createCommandClassName="DurationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="DurationEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Duration" />
+ <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="5187" editPartClassName="DurationNameEditPart"
+ itemSemanticEditPolicyClassName="DurationNameItemSemanticEditPolicy"
+ 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" 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="6115"
+ editPartClassName="DurationFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DurationFloatingLabelItemSemanticEditPolicy">
+ <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="2105" editPartClassName="TimeIntervalEditPart"
+ itemSemanticEditPolicyClassName="TimeIntervalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TimeIntervalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeIntervalGraphicalNodeEditPolicy"
+ createCommandClassName="TimeIntervalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="TimeIntervalEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval" />
+ <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="5188" editPartClassName="TimeIntervalNameEditPart"
+ itemSemanticEditPolicyClassName="TimeIntervalNameItemSemanticEditPolicy"
+ 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="6116"
+ editPartClassName="TimeIntervalFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="TimeIntervalFloatingLabelItemSemanticEditPolicy">
+ <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="2106" editPartClassName="DurationIntervalEditPart"
+ itemSemanticEditPolicyClassName="DurationIntervalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DurationIntervalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationIntervalGraphicalNodeEditPolicy"
+ createCommandClassName="DurationIntervalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="DurationIntervalEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval" />
+ <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="5189" editPartClassName="DurationIntervalNameEditPart"
+ itemSemanticEditPolicyClassName="DurationIntervalNameItemSemanticEditPolicy"
+ 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="6117"
+ editPartClassName="DurationIntervalFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DurationIntervalFloatingLabelItemSemanticEditPolicy">
+ <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="2107" editPartClassName="IntervalEditPart"
+ itemSemanticEditPolicyClassName="IntervalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="IntervalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="IntervalGraphicalNodeEditPolicy"
+ createCommandClassName="IntervalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="IntervalEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval" />
+ <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="5190" editPartClassName="IntervalNameEditPart"
+ itemSemanticEditPolicyClassName="IntervalNameItemSemanticEditPolicy"
+ 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" 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="6118"
+ editPartClassName="IntervalFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="IntervalFloatingLabelItemSemanticEditPolicy">
+ <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="2108" editPartClassName="InstanceValueEditPart"
+ itemSemanticEditPolicyClassName="InstanceValueItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InstanceValueCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InstanceValueGraphicalNodeEditPolicy"
+ createCommandClassName="InstanceValueCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="InstanceValueEditHelper" />
+ <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.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>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceValue" />
+ <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="5191" editPartClassName="InstanceValueNameEditPart"
+ itemSemanticEditPolicyClassName="InstanceValueNameItemSemanticEditPolicy"
+ 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" 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="6119"
+ editPartClassName="InstanceValueFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="InstanceValueFloatingLabelItemSemanticEditPolicy">
+ <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="2109" 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"
+ definedExternally="true" metamodelType="/0/@diagram/@childNodes.28/@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.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.12">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5192" 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.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body" />
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes visualID="2110" editPartClassName="DurationConstraintEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DurationConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="DurationConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ definedExternally="true" />
+ <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/DurationConstraint" />
+ <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.15">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5193" editPartClassName="DurationConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintNameItemSemanticEditPolicy"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6035" editPartClassName="DurationConstraintSpecificationEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintSpecificationItemSemanticEditPolicy">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes visualID="2111" editPartClassName="TimeConstraintEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TimeConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="TimeConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="TimeConstraintEditHelper" />
+ <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/TimeConstraint" />
+ <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.16">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5194" editPartClassName="TimeConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintNameItemSemanticEditPolicy"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6036" editPartClassName="TimeConstraintSpecificationEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintSpecificationItemSemanticEditPolicy">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes visualID="2112" editPartClassName="IntervalConstraintEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="IntervalConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="IntervalConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="IntervalConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="IntervalConstraintEditHelper" />
+ <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/IntervalConstraint" />
+ <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.14">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5195" editPartClassName="IntervalConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintNameItemSemanticEditPolicy"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6037" editPartClassName="IntervalConstraintSpecificationEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintSpecificationItemSemanticEditPolicy">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes visualID="2113" editPartClassName="InteractionConstraintEditPart"
+ itemSemanticEditPolicyClassName="InteractionConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InteractionConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InteractionConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="InteractionConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="InteractionConstraintEditHelper" />
+ <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/InteractionConstraint" />
+ <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.13">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5196" editPartClassName="InteractionConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="InteractionConstraintNameItemSemanticEditPolicy"
+ 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" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6038" editPartClassName="InteractionConstraintSpecificationEditPart"
+ itemSemanticEditPolicyClassName="InteractionConstraintSpecificationItemSemanticEditPolicy">
+ <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" />
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes visualID="2114" 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"
+ definedExternally="true" 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.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.13">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification" />
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="5197" 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.0" viewPattern=""
+ editorPattern="" editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6039" 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.4">
+ <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>
+ <links visualID="4022" editPartClassName="BehaviorPortLinkEditPart"
+ itemSemanticEditPolicyClassName="BehaviorPortLinkItemSemanticEditPolicy"
+ createCommandClassName="BehaviorPortLinkCreateCommand"
+ reorientCommandClassName="BehaviorPortLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:NotationType"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoConnectableEditPolicy" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.NoDeleteFromDiagramEditPolicy" />
+ </links>
+ <links visualID="4001" 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"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure" />
+ </links>
+ <links visualID="4002" 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"
+ displayName="CommentAnnotatedElement" definedExternally="true" />
+ <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="4003" 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"
+ displayName="ConstraintConstrainedElement" definedExternally="true" />
+ <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="4004" editPartClassName="ComponentRealizationEditPart"
+ itemSemanticEditPolicyClassName="ComponentRealizationItemSemanticEditPolicy"
+ createCommandClassName="ComponentRealizationCreateCommand"
+ reorientCommandClassName="ComponentRealizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ComponentRealizationEditHelper" />
+ <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">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ComponentRealization" />
+ <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="6001" editPartClassName="ComponentRealizationNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentRealizationNameItemSemanticEditPolicy">
+ <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="6015"
+ editPartClassName="ComponentRealizationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ComponentRealizationAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4005" 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"
+ definedExternally="true" 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.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/InterfaceRealization" />
+ <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="6002" 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.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6016"
+ editPartClassName="InterfaceRealizationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InterfaceRealizationAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4011" 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"
+ definedExternally="true" editHelperClassName="SubstitutionEditHelper" />
+ <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.AppliedStereotypeSubstitutionLabelDisplayEditPolicy" />
+ <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/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="6003" 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.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6017" editPartClassName="SubstitutionAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="SubstitutionAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4006" 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"
+ definedExternally="true" 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">
+ <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="6004" 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.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6018" 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="30" />
+ </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="4012" 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"
+ definedExternally="true" 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" />
+ <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/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="6005" 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" viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6019" editPartClassName="ManifestationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ManifestationAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4007" 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"
+ definedExternally="true" 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.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy" />
+ <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="6006" 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="60" />
+ </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 visualID="6020" editPartClassName="AbstractionAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="AbstractionAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4008" 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"
+ definedExternally="true" 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.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy" />
+ <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="6007" 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="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="6021" editPartClassName="UsageAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="UsageAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4009" 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"
+ definedExternally="true" 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" />
+ <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/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="6008" 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="6022" editPartClassName="DeploymentAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="DeploymentAppliedStereotypeItemSemanticEditPolicy"
+ 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="30" />
+ </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="4017" editPartClassName="RoleBindingEditPart"
+ itemSemanticEditPolicyClassName="RoleBindingItemSemanticEditPolicy"
+ sourceReorientingAllowed="false" createCommandClassName="RoleBindingCreateCommand"
+ reorientCommandClassName="RoleBindingReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.RoleBinding_4017"
+ displayName="RoleBinding" definedExternally="true"
+ editHelperClassName="RoleBindingEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.RoleBindingFigure" />
+ <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.4">
+ <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" />
+ <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="6027" editPartClassName="RoleBindingRoleNameEditPart"
+ itemSemanticEditPolicyClassName="RoleBindingRoleNameItemSemanticEditPolicy"
+ readOnly="true" alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleLabel"
+ 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">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6028" editPartClassName="RoleBindingAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="RoleBindingAppliedStereotypeItemSemanticEditPolicy"
+ 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.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>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.5"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.6" />
+ </links>
+ <links visualID="4010" 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"
+ definedExternally="true" 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.3">
+ <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="6009" 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="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="6023" 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="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="4013" editPartClassName="ConnectorEditPart"
+ itemSemanticEditPolicyClassName="ConnectorItemSemanticEditPolicy"
+ createCommandClassName="ConnectorCreateCommand"
+ reorientCommandClassName="ConnectorReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" editHelperClassName="ConnectorEditHelper" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.ConnectorFigure" />
+ <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/Connector" />
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedConnector" />
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedConnector" />
+ <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/Connector/end" />
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Connector/end" />
+ </modelFacet>
+ <labels visualID="6025" editPartClassName="ConnectorAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ConnectorAppliedStereotypeItemSemanticEditPolicy"
+ 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.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>
+ <labels visualID="6050" editPartClassName="ConnectorNameEditPart"
+ itemSemanticEditPolicyClassName="ConnectorNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="-20" />
+ </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 visualID="6051" editPartClassName="ConnectorMultiplicitySourceEditPart"
+ itemSemanticEditPolicyClassName="ConnectorMultiplicitySourceItemSemanticEditPolicy"
+ 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>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0" viewPattern="sourceMul{0}"
+ editorPattern="sourceMul{0}" editPattern="sourceMul{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ <labels visualID="6052" editPartClassName="ConnectorMultiplicityTargetEditPart"
+ itemSemanticEditPolicyClassName="ConnectorMultiplicityTargetItemSemanticEditPolicy"
+ readOnly="true" alignment="TARGET">
+ <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>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0" viewPattern="targetMul{0}"
+ editorPattern="targetMul{0}" editPattern="targetMul{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name" />
+ </modelFacet>
+ </labels>
+ </links>
+ <links visualID="4015" 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"
+ definedExternally="true" 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="6024" 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.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="4018" editPartClassName="TimeObservationEventEditPart"
+ itemSemanticEditPolicyClassName="TimeObservationEventSemanticEditPolicy"
+ createCommandClassName="TimeObservationEventCreateCommand"
+ reorientCommandClassName="TimeObservationEventReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ displayName="TimeObservationEvent" definedExternally="true" />
+ <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="4019" editPartClassName="DurationObservationEventEditPart"
+ itemSemanticEditPolicyClassName="DurationObservationEventItemSemanticEditPolicy"
+ createCommandClassName="DurationObservationEventCreateCommand"
+ reorientCommandClassName="DurationObservationEventReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ displayName="DurationObservationEvent" definedExternally="true" />
+ <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="4020" editPartClassName="RepresentationEditPart"
+ itemSemanticEditPolicyClassName="RepresentationItemSemanticEditPolicy"
+ createCommandClassName="RepresentationCreateCommand"
+ reorientCommandClassName="RepresentationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.RepresentationFigure">
+ <attributes xsi:type="gmfgen:ColorAttributes"
+ foregroundColor="black" />
+ </viewmap>
+ <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem/represented" />
+ </modelFacet>
+ <labels visualID="6030" editPartClassName="RepresentationTagLabelEditPart"
+ itemSemanticEditPolicyClassName="RepresentationTagLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node" />
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getTagLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="15" />
+ </viewmap>
+ </labels>
+ <creationConstraints
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.8" />
+ </links>
+ <links visualID="4021" editPartClassName="InformationFlowEditPart"
+ itemSemanticEditPolicyClassName="InformationFlowItemSemanticEditPolicy"
+ createCommandClassName="InformationFlowCreateCommand"
+ reorientCommandClassName="InformationFlowReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge" />
+ <elementType xsi:type="gmfgen:MetamodelType"
+ definedExternally="true" />
+ <viewmap xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationFlowFigure" />
+ <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.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="6031" 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.uml.diagram.composite.custom.edit.policies.AbstractCustomLabelEditPolicy.SPECIFIC_NAME_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.InformationFlowCustomLabelEditPolicy" />
+ </labels>
+ <labels visualID="6032" 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>
+ <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>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.9"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.10" />
+ </links>
+ <compartments visualID="7033"
+ editPartClassName="DataTypeAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.34" title="attributes"
+ node="/0/@diagram/@topLevelNodes.15">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7034"
+ editPartClassName="DataTypeOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.35" title="operations"
+ node="/0/@diagram/@topLevelNodes.15">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7036"
+ editPartClassName="DataTypeAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.34" title="attributes"
+ node="/0/@diagram/@childNodes.21">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7037"
+ editPartClassName="DataTypeOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.35" title="operations"
+ node="/0/@diagram/@childNodes.21">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7048"
+ editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart"
+ itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.36" title="literals"
+ node="/0/@diagram/@topLevelNodes.14">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7049"
+ editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.36" title="literals"
+ node="/0/@diagram/@childNodes.20">
+ <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;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.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.composite.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="7050"
+ editPartClassName="ActivityCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ActivityCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@childNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7051"
+ editPartClassName="InteractionCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="InteractionCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InteractionCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7052"
+ editPartClassName="ProtocolStateMachineCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ProtocolStateMachineCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7053"
+ editPartClassName="StateMachineCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="StateMachineCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="StateMachineCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7054"
+ editPartClassName="FunctionBehaviorCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="FunctionBehaviorCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7055"
+ editPartClassName="OpaqueBehaviorCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="OpaqueBehaviorCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7056"
+ editPartClassName="ComponentCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@childNodes.12"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7057"
+ editPartClassName="DeviceCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@childNodes.13"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7058"
+ editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@childNodes.14"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7059"
+ editPartClassName="NodeCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@childNodes.15"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7060"
+ editPartClassName="ClassCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ClassCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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.0"
+ title="internal structure" node="/0/@diagram/@childNodes.16"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7061"
+ editPartClassName="CollaborationCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="CollaborationCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CollaborationCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33"
+ title="internal structure" node="/0/@diagram/@childNodes.17"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.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="7063"
+ editPartClassName="ActivityCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ActivityCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7064"
+ editPartClassName="InteractionCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InteractionCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InteractionCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7065"
+ editPartClassName="ProtocolStateMachineCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ProtocolStateMachineCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7066"
+ editPartClassName="StateMachineCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="StateMachineCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateMachineCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" node="/0/@diagram/@topLevelNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7067"
+ editPartClassName="FunctionBehaviorCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="FunctionBehaviorCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7068"
+ editPartClassName="OpaqueBehaviorCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OpaqueBehaviorCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7069"
+ editPartClassName="ComponentCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7070"
+ editPartClassName="DeviceCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7071"
+ editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7072"
+ editPartClassName="NodeCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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"
+ title="internal structure" 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="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure" />
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7073"
+ editPartClassName="ClassCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ClassCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32"
+ title="internal structure" node="/0/@diagram/@topLevelNodes.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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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="7075"
+ editPartClassName="CollaborationCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="CollaborationCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CollaborationCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33"
+ title="internal structure" node="/0/@diagram/@topLevelNodes.11"
+ 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.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="7077"
+ editPartClassName="PropertyPartCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="PropertyPartCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PropertyPartCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.28"
+ title="internal structure" 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="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" />
+ <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.composite.custom.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.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy" />
+ <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;composite.group.nodes&quot;">
+ <entries xsi:type="gmfgen:ToolEntry" title="Class"
+ description="Create 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"
+ createMethodName="createClassCreationTool" id="&quot;composite.tool.class&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Property"
+ description="Create 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"
+ createMethodName="createPropertyCreationTool" id="&quot;composite.tool.property&quot;"
+ genNodes="/0/@diagram/@childNodes.3" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Port"
+ description="Create new Port"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
+ createMethodName="createPortCreationTool" id="&quot;composite.tool.port&quot;"
+ genNodes="/0/@diagram/@childNodes.1" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Collaboration"
+ description="Create new Collaboration"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif"
+ createMethodName="createCollaborationCreationTool" id="&quot;composite.tool.collaboration&quot;"
+ genNodes="/0/@diagram/@childNodes.17 /0/@diagram/@topLevelNodes.11" />
+ <entries xsi:type="gmfgen:ToolEntry" title="CollaborationRole"
+ description="Create new CollaborationRole" largeIconPath="icons/obj16/CollaborationRole.gif"
+ smallIconPath="icons/obj16/CollaborationRole.gif"
+ createMethodName="createCollaborationRoleCreationTool" id="&quot;composite.tool.collaborationrole&quot;"
+ genNodes="/0/@diagram/@childNodes.4" />
+ <entries xsi:type="gmfgen:ToolEntry" title="CollaborationUse"
+ description="Create new CollaborationUse"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ createMethodName="createCollaborationUseCreationTool" id="&quot;composite.tool.collaborationuse&quot;"
+ genNodes="/0/@diagram/@childNodes.5" />
+ <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;composite.tool.comment&quot;"
+ genNodes="/0/@diagram/@childNodes.28 /0/@diagram/@topLevelNodes.43" />
+ <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;composite.tool.constraint&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.48 /0/@diagram/@childNodes.33" />
+ <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="createTimeObservationCreationTool" id="&quot;composite.tool.timeobservation&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.28" />
+ <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"
+ createMethodName="createDurationObservationCreationTool" id="&quot;composite.tool.durationobservation&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.27" />
+ <entries xsi:type="gmfgen:ToolEntry" title="InformationItem"
+ description="Create new 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"
+ createMethodName="createInformationItemCreationTool" id="&quot;composite.tool.informationitem&quot;"
+ genNodes="/0/@diagram/@childNodes.25 /0/@diagram/@topLevelNodes.19" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Parameter"
+ description="Create new Parameter"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif"
+ createMethodName="createParameterCreationTool" id="&quot;composite.tool.parameter&quot;"
+ genNodes="/0/@diagram/@childNodes.2" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Activity"
+ description="Create new 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"
+ createMethodName="createActivityCreationTool" id="&quot;composite.tool.activity&quot;"
+ genNodes="/0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Interaction"
+ description="Create new Interaction"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
+ createMethodName="createInteractionCreationTool" id="&quot;composite.tool.interaction&quot;"
+ genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.1" />
+ <entries xsi:type="gmfgen:ToolEntry" title="ProtocolStateMachine"
+ description="Create new ProtocolStateMachine"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif"
+ createMethodName="createProtocolStateMachineCreationTool" id="&quot;composite.tool.protocolstatemachine&quot;"
+ genNodes="/0/@diagram/@childNodes.8 /0/@diagram/@topLevelNodes.2" />
+ <entries xsi:type="gmfgen:ToolEntry" title="StateMachine"
+ description="Create new StateMachine"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif"
+ createMethodName="createStateMachineCreationTool" id="&quot;composite.tool.statemachine&quot;"
+ genNodes="/0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.3" />
+ <entries xsi:type="gmfgen:ToolEntry" title="FunctionBehavior"
+ description="Create new FunctionBehavior"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif"
+ createMethodName="createFunctionBehaviorCreationTool" id="&quot;composite.tool.functionbehavior&quot;"
+ genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@topLevelNodes.4" />
+ <entries xsi:type="gmfgen:ToolEntry" title="OpaqueBehavior"
+ description="Create new OpaqueBehavior"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif"
+ createMethodName="createOpaqueBehaviorCreationTool" id="&quot;composite.tool.opaquebehavior&quot;"
+ genNodes="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5" />
+ <entries xsi:type="gmfgen:ToolEntry" title="StringExpression"
+ description="Create new StringExpression"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StringExpression.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StringExpression.gif"
+ createMethodName="createStringExpressionCreationTool" id="&quot;composite.tool.stringExpression&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.34" />
+ </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"
+ createMethodName="createEdgesGroup" id="&quot;composite.group.edges&quot;">
+ <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;composite.tool.link&quot;"
+ genLinks="/0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.16 /0/@diagram/@links.17" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Connector"
+ description="Create new Connector"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ createMethodName="createConnectorCreationTool" id="&quot;composite.tool.connector&quot;"
+ genLinks="/0/@diagram/@links.14" />
+ <entries xsi:type="gmfgen:ToolEntry" title="RoleBinding"
+ description="Create new RoleBinding" largeIconPath="icons/obj16/CollaborationRoleBinding.gif"
+ smallIconPath="icons/obj16/CollaborationRoleBinding.gif"
+ createMethodName="createRoleBindingCreationTool" id="&quot;composite.tool.rolebinding&quot;"
+ genLinks="/0/@diagram/@links.12" />
+ <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;composite.tool.generalization&quot;"
+ genLinks="/0/@diagram/@links.15" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Realization"
+ description="Create new 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"
+ createMethodName="createRealizationCreationTool" id="&quot;composite.tool.realization&quot;"
+ genLinks="/0/@diagram/@links.7" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Substitution"
+ description="Create new 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"
+ createMethodName="createSubstitutionCreationTool" id="&quot;composite.tool.substitution&quot;"
+ genLinks="/0/@diagram/@links.6" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Abstraction"
+ description="Create new 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"
+ createMethodName="createAbstractionCreationTool" id="&quot;composite.tool.abstraction&quot;"
+ genLinks="/0/@diagram/@links.9" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Usage"
+ description="Create new 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"
+ createMethodName="createUsageCreationTool" id="&quot;composite.tool.usage&quot;"
+ genLinks="/0/@diagram/@links.10" />
+ <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;composite.tool.dependency&quot;"
+ genLinks="/0/@diagram/@links.13" />
+ <entries xsi:type="gmfgen:ToolEntry" title="Representation"
+ description="Create new representation for an InformationItem"
+ largeIconPath="icons/obj16/Representation.gif" smallIconPath="icons/obj16/Representation.gif"
+ createMethodName="createRepresentationCreationTool" id="&quot;composite.tool.representation&quot;"
+ genLinks="/0/@diagram/@links.18" />
+ <entries xsi:type="gmfgen:ToolEntry" title="InformationFlow"
+ description="Create new InformationFlow"
+ 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="createInformationFlowCreationTool" id="&quot;composite.tool.informationflow&quot;"
+ genLinks="/0/@diagram/@links.19" />
+ <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;composite.tool.manifestation&quot;"
+ genLinks="/0/@diagram/@links.8" />
+ <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;composite.tool.deployment&quot;"
+ genLinks="/0/@diagram/@links.11" />
+ </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.composite" name="Papyrus Composite Structure 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 />
+ <diagramUpdater nodeDescriptorClassName="UMLNodeDescriptor" />
+ <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="return it.getBody();" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// Property / CollaborationRole constraint&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;// Restriction for the case where domainElement owner is a Collaboration&#xD;&#xA;&#x9;&#x9;// If the domainElement is not referenced as one of its owner role&#xD;&#xA;&#x9;&#x9;// then it should be considered as a Property creation on Collaboration,&#xD;&#xA;&#x9;&#x9;// else the test should return false and be considered as a representation of&#xD;&#xA;&#x9;&#x9;// a collaboration role (ConnectableElement).&#xD;&#xA;&#x9;&#x9;if (containerView.getElement() instanceof org.eclipse.uml2.uml.Collaboration) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.Collaboration graphicalParent = (org.eclipse.uml2.uml.Collaboration) containerView.getElement();&#xD;&#xA;&#x9;&#x9;&#x9;if (graphicalParent.getCollaborationRoles().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;// General case : no restriction&#xD;&#xA;&#x9;&#x9;return true;" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// Test if the dependency is not a RoleBinding&#xD;&#xA;&#x9;&#x9;if (domainElement.getOwner() instanceof org.eclipse.uml2.uml.CollaborationUse) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.CollaborationUse owner = (org.eclipse.uml2.uml.CollaborationUse) domainElement.getOwner();&#xD;&#xA;&#x9;&#x9;&#x9;if (owner.getRoleBindings().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return true;" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// Test if the dependency is a RoleBinding&#xD;&#xA;&#x9;&#x9;if (domainElement.getOwner() instanceof org.eclipse.uml2.uml.CollaborationUse) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.CollaborationUse owner = (org.eclipse.uml2.uml.CollaborationUse) domainElement.getOwner();&#xD;&#xA;&#x9;&#x9;&#x9;if (owner.getRoleBindings().contains(domainElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xD;&#xA;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// RoleBinding source constraint&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; !(source instanceof org.eclipse.uml2.uml.CollaborationUse)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;// RoleBinding source has a type&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; (((org.eclipse.uml2.uml.CollaborationUse) source).getType() == null)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// RoleBinding target constraint&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((target != null) &amp;&amp; !(target instanceof org.eclipse.uml2.uml.ConnectableElement)) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;// RoleBinding source and target have the same semantic parent&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if ((source != null) &amp;&amp; (target != null) &amp;&amp; (source.getOwner() != target.getOwner())) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}" />
+ <expressions body="// InformationItem is Abstract&#xD;&#xA;return true;" />
+ <expressions xsi:type="gmfgen:GenConstraint"
+ body="// Represented InformationItem Target&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if (target != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((target instanceof org.eclipse.uml2.uml.Class)&#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.InformationItem)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Signal) || &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;(target instanceof org.eclipse.uml2.uml.Component))) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}" />
+ <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;}" />
+ <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;" />
+ <expressions body="// Comment body init&#xD;&#xA;return &quot;&quot;;" />
+ <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="// IntervalConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.Interval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createInterval();&#xD;&#xA;return value;" />
+ <expressions
+ body="// DurationConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.DurationInterval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createDurationInterval();&#xD;&#xA;return value;" />
+ <expressions
+ body="// TimeConstraint specification init&#xD;&#xA;org.eclipse.uml2.uml.TimeInterval value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createTimeInterval();&#xD;&#xA;return value;" />
+
+ </providers>
+ <providers xsi:type="gmfgen:GenLiteralExpressionProvider">
+ <expressions
+ body="org.eclipse.uml2.uml.AggregationKind.COMPOSITE_LITERAL" />
+ </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/@topLevelNodes.2/@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.13/@labels.0/@modelFacet /0/@diagram/@childNodes.36/@labelModelFacet /0/@diagram/@topLevelNodes.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.15/@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/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@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.19/@labels.0/@modelFacet /0/@diagram/@childNodes.20/@labels.0/@modelFacet /0/@diagram/@childNodes.21/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@childNodes.17/@labels.0/@modelFacet /0/@diagram/@childNodes.22/@labels.0/@modelFacet /0/@diagram/@childNodes.23/@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.18/@labels.0/@modelFacet /0/@diagram/@childNodes.16/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.34/@labelModelFacet /0/@diagram/@childNodes.35/@labelModelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.16/@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/@topLevelNodes.20/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.21/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.22/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.23/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.24/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.25/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.26/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.29/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.30/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.31/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.32/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.33/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.34/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.35/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.36/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.37/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.38/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.39/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.40/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.41/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.42/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.44/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.45/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.46/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.47/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.48/@labels.0/@modelFacet /0/@diagram/@links.4/@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.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@links.11/@labels.0/@modelFacet /0/@diagram/@links.13/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.28/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@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.32/@labels.0/@modelFacet /0/@diagram/@links.14/@labels.1/@modelFacet /0/@diagram/@links.14/@labels.2/@modelFacet /0/@diagram/@links.14/@labels.3/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@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 /0/@diagram/@childNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.15/@labels.1/@modelFacet /0/@diagram/@childNodes.16/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.1/@modelFacet /0/@diagram/@childNodes.18/@labels.1/@modelFacet /0/@diagram/@childNodes.19/@labels.1/@modelFacet /0/@diagram/@childNodes.20/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.1/@modelFacet /0/@diagram/@childNodes.22/@labels.1/@modelFacet /0/@diagram/@childNodes.23/@labels.1/@modelFacet /0/@diagram/@childNodes.24/@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/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.13/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.14/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.15/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.16/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.19/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.20/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.21/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.22/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.23/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.24/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.25/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.26/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.29/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.30/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.31/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.32/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.33/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.34/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.35/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.36/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.37/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.38/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.39/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.40/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.41/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.42/@labels.1/@modelFacet" />
+ <implementations xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.4/@labels.1/@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.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.10/@labels.1/@modelFacet /0/@diagram/@links.11/@labels.1/@modelFacet /0/@diagram/@links.13/@labels.1/@modelFacet /0/@diagram/@links.15/@labels.0/@modelFacet /0/@diagram/@links.14/@labels.0/@modelFacet /0/@diagram/@links.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.28/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.27/@labels.1/@modelFacet /0/@diagram/@childNodes.1/@labels.1/@modelFacet /0/@diagram/@links.19/@labels.1/@modelFacet /0/@diagram/@childNodes.2/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser" />
+ <implementations xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.12/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.composite.custom.parsers.RoleBindingRoleNameParser" />
+ <implementations xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.43/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser" />
+ <implementations xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.44/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.45/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.46/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.47/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.48/@labels.1/@modelFacet /0/@diagram/@childNodes.29/@labels.1/@modelFacet /0/@diagram/@childNodes.30/@labels.1/@modelFacet /0/@diagram/@childNodes.31/@labels.1/@modelFacet /0/@diagram/@childNodes.33/@labels.1/@modelFacet /0/@diagram/@childNodes.32/@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="Add super class to a selected set of generated EditParts"
+ genView="/0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.19 /0/@diagram/@topLevelNodes.20 /0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.21 /0/@diagram/@topLevelNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@topLevelNodes.14 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.18 /0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@topLevelNodes.19 /0/@diagram/@childNodes.25"
+ name="EP_NamedElement_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart" />
+ <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.11 /0/@diagram/@links.13 /0/@diagram/@links.15 /0/@diagram/@links.14 /0/@diagram/@links.12 /0/@diagram/@links.19 /0/@diagram/@links.18 /0/@diagram/@links.3"
+ name="EP_NamedElement_EDGE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Adds a superclass for DurationObservationEditPart, TimeObservationEditPart"
+ genView="/0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.27"
+ name="EP_Observation_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manages stereotype shown with External Label"
+ genView="/0/@diagram/@topLevelNodes.28/@labels.1 /0/@diagram/@topLevelNodes.27/@labels.1 /0/@diagram/@childNodes.1/@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/@topLevelNodes.43 /0/@diagram/@childNodes.28"
+ 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/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33"
+ name="EP_Constraint_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed Port locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="External node label locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.27/@labels.1 /0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@topLevelNodes.28/@labels.1" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
+ comment="Property (Part) custom DiagramUpdater"
+ classpath="org.eclipse.papyrus.uml.diagram.composite.custom.parts.PropertyDiagramUpdater"
+ genNode="/0/@diagram/@childNodes.3" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
+ comment="Property (Part) compartment custom DiagramUpdater"
+ classpath="org.eclipse.papyrus.uml.diagram.composite.custom.parts.PropertyDiagramUpdater"
+ genNode="/0/@diagram/@compartments.30" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:GenNodeConstraint"
+ comment="Creation constraint for TopLevelNode in virtual canvas"
+ genNode="/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.10 /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/@topLevelNodes.20 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26 /0/@diagram/@topLevelNodes.27 /0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@topLevelNodes.43 /0/@diagram/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48"
+ genConstraint="/0/@expressionProviders/@providers.0/@expressions.11" />
+ <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/@childNodes.1 /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/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /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.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/@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.10 /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/@topLevelNodes.20 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26 /0/@diagram/@topLevelNodes.27 /0/@diagram/@topLevelNodes.28 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@topLevelNodes.43 /0/@diagram/@topLevelNodes.44 /0/@diagram/@topLevelNodes.45 /0/@diagram/@topLevelNodes.46 /0/@diagram/@topLevelNodes.47 /0/@diagram/@topLevelNodes.48 /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" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
+ comment="Use the edit service for reorient command (All DirectedRelationship)"
+ name="DirectedRelationship"
+ genView="/0/@diagram/@links.15 /0/@diagram/@links.19 /0/@diagram/@links.13 /0/@diagram/@links.11 /0/@diagram/@links.10 /0/@diagram/@links.9 /0/@diagram/@links.8 /0/@diagram/@links.7 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
+ comment="Use the edit service for reorient command (Connector)" name="Connector"
+ genView="/0/@diagram/@links.14" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an abstract class for BehaviorPortEditPart" genView="/0/@diagram/@childNodes.0"
+ name="AbstractBehaviorPortEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.composite.custom.edit.parts.AbstractBehaviorPortEditPart" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.0/@labels.0 /0/@diagram/@childNodes.2/@labels.0 /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 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.16/@labels.1 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.24/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.9/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.14/@labels.1 /0/@diagram/@topLevelNodes.15/@labels.1 /0/@diagram/@topLevelNodes.16/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.19/@labels.1 /0/@diagram/@topLevelNodes.20/@labels.1 /0/@diagram/@topLevelNodes.21/@labels.1 /0/@diagram/@topLevelNodes.22/@labels.1 /0/@diagram/@topLevelNodes.23/@labels.1 /0/@diagram/@topLevelNodes.24/@labels.1 /0/@diagram/@topLevelNodes.25/@labels.1 /0/@diagram/@topLevelNodes.26/@labels.1 /0/@diagram/@topLevelNodes.29/@labels.1 /0/@diagram/@topLevelNodes.30/@labels.1 /0/@diagram/@topLevelNodes.31/@labels.1 /0/@diagram/@topLevelNodes.32/@labels.1 /0/@diagram/@topLevelNodes.33/@labels.1 /0/@diagram/@topLevelNodes.34/@labels.1 /0/@diagram/@topLevelNodes.35/@labels.1 /0/@diagram/@topLevelNodes.36/@labels.1 /0/@diagram/@topLevelNodes.37/@labels.1 /0/@diagram/@topLevelNodes.38/@labels.1 /0/@diagram/@topLevelNodes.39/@labels.1 /0/@diagram/@topLevelNodes.40/@labels.1 /0/@diagram/@topLevelNodes.41/@labels.1 /0/@diagram/@topLevelNodes.42/@labels.1 /0/@diagram/@topLevelNodes.27/@labels.0 /0/@diagram/@topLevelNodes.28/@labels.0"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart" />
+ <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.1/@labels.0 /0/@diagram/@childNodes.2/@labels.0 /0/@diagram/@topLevelNodes.27/@labels.0 /0/@diagram/@topLevelNodes.28/@labels.0 /0/@diagram/@childNodes.0/@labels.0 /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 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.16/@labels.1 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.24/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.9/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.14/@labels.1 /0/@diagram/@topLevelNodes.15/@labels.1 /0/@diagram/@topLevelNodes.16/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.19/@labels.1 /0/@diagram/@topLevelNodes.20/@labels.1 /0/@diagram/@topLevelNodes.21/@labels.1 /0/@diagram/@topLevelNodes.22/@labels.1 /0/@diagram/@topLevelNodes.23/@labels.1 /0/@diagram/@topLevelNodes.24/@labels.1 /0/@diagram/@topLevelNodes.25/@labels.1 /0/@diagram/@topLevelNodes.26/@labels.1 /0/@diagram/@topLevelNodes.29/@labels.1 /0/@diagram/@topLevelNodes.30/@labels.1 /0/@diagram/@topLevelNodes.31/@labels.1 /0/@diagram/@topLevelNodes.32/@labels.1 /0/@diagram/@topLevelNodes.33/@labels.1 /0/@diagram/@topLevelNodes.34/@labels.1 /0/@diagram/@topLevelNodes.35/@labels.1 /0/@diagram/@topLevelNodes.36/@labels.1 /0/@diagram/@topLevelNodes.37/@labels.1 /0/@diagram/@topLevelNodes.38/@labels.1 /0/@diagram/@topLevelNodes.39/@labels.1 /0/@diagram/@topLevelNodes.40/@labels.1 /0/@diagram/@topLevelNodes.41/@labels.1 /0/@diagram/@topLevelNodes.42/@labels.1" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@topLevelNodes.33 /0/@diagram/@topLevelNodes.32 /0/@diagram/@topLevelNodes.31 /0/@diagram/@topLevelNodes.30 /0/@diagram/@topLevelNodes.29 /0/@diagram/@topLevelNodes.34 /0/@diagram/@topLevelNodes.35 /0/@diagram/@topLevelNodes.36 /0/@diagram/@topLevelNodes.37 /0/@diagram/@topLevelNodes.38 /0/@diagram/@topLevelNodes.39 /0/@diagram/@topLevelNodes.40 /0/@diagram/@topLevelNodes.41 /0/@diagram/@topLevelNodes.42 /0/@diagram/@childNodes.23 /0/@diagram/@topLevelNodes.17 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.27 /0/@diagram/@topLevelNodes.21 /0/@diagram/@topLevelNodes.22 /0/@diagram/@topLevelNodes.23 /0/@diagram/@topLevelNodes.24 /0/@diagram/@topLevelNodes.25 /0/@diagram/@topLevelNodes.26"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart" />
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="extend view for affixed node" genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2"
+ 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.composite/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
index 8ee35f253c1..c6e38e5f79c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
@@ -15,22 +15,22 @@
-->
<plugin>
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.composite.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.composite.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.composite.preferences.DiagramPreferenceInitializer"/>
- </extension>
+ <extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.composite.preferences.DiagramPreferenceInitializer"/>
+ </extension>
<extension point="org.eclipse.ui.preferencePages" id="prefpages">
<?gmfgen generated="false"?>
@@ -57,77 +57,77 @@
</extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.composite"
- labelProvider="org.eclipse.papyrus.uml.diagram.composite.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.composite">
- <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.composite">
- <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.composite.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </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.composite.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="CompositeStructure"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2060,2061,2062,2063,2064,2065,2069,2070,2071,2072,2073,2075,2076,2066,2067,2068,2077,2078,2079,2080,2081,2082,2083,2084,2085,2088,2089,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,3121,3069,3088,3070,3115,3071,3072,3073,3074,3075,3076,3077,3081,3082,3083,3084,3085,3086,3087,3078,3079,3080,3091,3092,3093,3094,3095,3096,3097,3116,3117,3118,3119,3120,3101,3102,3066"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4022,4001,4002,4003,4004,4005,4011,4006,4012,4007,4008,4009,4017,4010,4013,4015,4018,4019,4020,4021"/>
- </viewProvider>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.composite"
+ labelProvider="org.eclipse.papyrus.uml.diagram.composite.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.composite">
+ <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.composite">
+ <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.composite.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </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.composite.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="CompositeStructure"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2060,2061,2062,2063,2064,2065,2069,2070,2071,2072,2073,2075,2076,2066,2067,2068,2077,2078,2079,2080,2081,2082,2083,2084,2085,2088,2089,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,3121,3069,3088,3070,3115,3071,3072,3073,3074,3075,3076,3077,3081,3082,3083,3084,3085,3086,3087,3078,3079,3080,3091,3092,3093,3094,3095,3096,3097,3116,3117,3118,3119,3120,3101,3102,3066"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4022,4001,4002,4003,4004,4005,4011,4006,4012,4007,4008,4009,4017,4010,4013,4015,4018,4019,4020,4021"/>
+ </viewProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
<?gmfgen generated="false"?>
@@ -153,1153 +153,21 @@
</extension>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.composite.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.composite.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.composite.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.composite.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.composite.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.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.composite.Activity_2060"
- name="%metatype.name.Activity_2060"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Activity"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ActivityEditHelper">
- <param name="semanticHint" value="2060"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Interaction_2061"
- name="%metatype.name.Interaction_2061"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interaction"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InteractionEditHelper">
- <param name="semanticHint" value="2061"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_2062"
- name="%metatype.name.ProtocolStateMachine_2062"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ProtocolStateMachine"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ProtocolStateMachineEditHelper">
- <param name="semanticHint" value="2062"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.StateMachine_2063"
- name="%metatype.name.StateMachine_2063"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="StateMachine"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.StateMachineEditHelper">
- <param name="semanticHint" value="2063"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_2064"
- name="%metatype.name.FunctionBehavior_2064"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="FunctionBehavior"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.FunctionBehaviorEditHelper">
- <param name="semanticHint" value="2064"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_2065"
- name="%metatype.name.OpaqueBehavior_2065"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="OpaqueBehavior"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.OpaqueBehaviorEditHelper">
- <param name="semanticHint" value="2065"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Component_2069"
- name="%metatype.name.Component_2069"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Component"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ComponentEditHelper">
- <param name="semanticHint" value="2069"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Device_2070"
- name="%metatype.name.Device_2070"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Device"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DeviceEditHelper">
- <param name="semanticHint" value="2070"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_2071"
- name="%metatype.name.ExecutionEnvironment_2071"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ExecutionEnvironment"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ExecutionEnvironmentEditHelper">
- <param name="semanticHint" value="2071"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Node_2072"
- name="%metatype.name.Node_2072"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Node"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.NodeEditHelper">
- <param name="semanticHint" value="2072"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Class_2073"
- name="%metatype.name.Class_2073"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Class"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ClassEditHelper">
- <param name="semanticHint" value="2073"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Collaboration_2075"
- name="%metatype.name.Collaboration_2075"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Collaboration_3086"/>
- <param name="semanticHint" value="2075"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Interface_2076"
- name="%metatype.name.Interface_2076"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Interface_3087"/>
- <param name="semanticHint" value="2076"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_2066"
- name="%metatype.name.PrimitiveType_2066"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PrimitiveType"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.PrimitiveTypeEditHelper">
- <param name="semanticHint" value="2066"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Enumeration_2067"
- name="%metatype.name.Enumeration_2067"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Enumeration"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.EnumerationEditHelper">
- <param name="semanticHint" value="2067"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.DataType_2068"
- name="%metatype.name.DataType_2068"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DataType"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DataTypeEditHelper">
- <param name="semanticHint" value="2068"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Actor_2077"
- name="%metatype.name.Actor_2077"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Actor_3091"/>
- <param name="semanticHint" value="2077"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_2078"
- name="%metatype.name.DeploymentSpecification_2078"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_3092"/>
- <param name="semanticHint" value="2078"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Artifact_2079"
- name="%metatype.name.Artifact_2079"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Artifact_3093"/>
- <param name="semanticHint" value="2079"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.InformationItem_2080"
- name="%metatype.name.InformationItem_2080"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.InformationItem_3094"/>
- <param name="semanticHint" value="2080"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Signal_2081"
- name="%metatype.name.Signal_2081"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Signal_3095"/>
- <param name="semanticHint" value="2081"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.UseCase_2082"
- name="%metatype.name.UseCase_2082"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.UseCase_3096"/>
- <param name="semanticHint" value="2082"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.SignalEvent_2083"
- name="%metatype.name.SignalEvent_2083"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="SignalEvent"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.SignalEventEditHelper">
- <param name="semanticHint" value="2083"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.CallEvent_2084"
- name="%metatype.name.CallEvent_2084"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="CallEvent"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.CallEventEditHelper">
- <param name="semanticHint" value="2084"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.AnyReceiveEvent_2085"
- name="%metatype.name.AnyReceiveEvent_2085"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="AnyReceiveEvent"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.AnyReceiveEventEditHelper">
- <param name="semanticHint" value="2085"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088"
- name="%metatype.name.ChangeEvent_2088"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ChangeEvent"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ChangeEventEditHelper">
- <param name="semanticHint" value="2088"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeEvent_2089"
- name="%metatype.name.TimeEvent_2089"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeEvent"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.TimeEventEditHelper">
- <param name="semanticHint" value="2089"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.DurationObservation_2093"
- name="%metatype.name.DurationObservation_2093"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DurationObservationEditHelper">
- <param name="semanticHint" value="2093"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeObservation_2094"
- name="%metatype.name.TimeObservation_2094"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.TimeObservationEditHelper">
- <param name="semanticHint" value="2094"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.LiteralBoolean_2095"
- name="%metatype.name.LiteralBoolean_2095"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="LiteralBoolean"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.LiteralBooleanEditHelper">
- <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.composite.LiteralInteger_2096"
- name="%metatype.name.LiteralInteger_2096"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="LiteralInteger"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.LiteralIntegerEditHelper">
- <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.composite.LiteralNull_2097"
- name="%metatype.name.LiteralNull_2097"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="LiteralNull"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.LiteralNullEditHelper">
- <param name="semanticHint" value="2097"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.LiteralString_2098"
- name="%metatype.name.LiteralString_2098"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="LiteralString"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.LiteralStringEditHelper">
- <param name="semanticHint" value="2098"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.LiteralUnlimitedNatural_2099"
- name="%metatype.name.LiteralUnlimitedNatural_2099"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="LiteralUnlimitedNatural"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.LiteralUnlimitedNaturalEditHelper">
- <param name="semanticHint" value="2099"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.StringExpression_2100"
- name="%metatype.name.StringExpression_2100"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="StringExpression"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.StringExpressionEditHelper">
- <param name="semanticHint" value="2100"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.OpaqueExpression_2101"
- name="%metatype.name.OpaqueExpression_2101"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="OpaqueExpression"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.OpaqueExpressionEditHelper">
- <param name="semanticHint" value="2101"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeExpression_2102"
- name="%metatype.name.TimeExpression_2102"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeExpression"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.TimeExpressionEditHelper">
- <param name="semanticHint" value="2102"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Expression_2103"
- name="%metatype.name.Expression_2103"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Expression"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ExpressionEditHelper">
- <param name="semanticHint" value="2103"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Duration_2104"
- name="%metatype.name.Duration_2104"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Duration"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DurationEditHelper">
- <param name="semanticHint" value="2104"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeInterval_2105"
- name="%metatype.name.TimeInterval_2105"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeInterval"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.TimeIntervalEditHelper">
- <param name="semanticHint" value="2105"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.DurationInterval_2106"
- name="%metatype.name.DurationInterval_2106"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationInterval"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DurationIntervalEditHelper">
- <param name="semanticHint" value="2106"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Interval_2107"
- name="%metatype.name.Interval_2107"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interval"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.IntervalEditHelper">
- <param name="semanticHint" value="2107"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.InstanceValue_2108"
- name="%metatype.name.InstanceValue_2108"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InstanceValue"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InstanceValueEditHelper">
- <param name="semanticHint" value="2108"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"
- name="%metatype.name.Comment_2109"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/>
- <param name="semanticHint" value="2109"/>
- </specializationType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_2110"
- name="%metatype.name.DurationConstraint_2110"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="2110"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_2111"
- name="%metatype.name.TimeConstraint_2111"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeConstraint"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.TimeConstraintEditHelper">
- <param name="semanticHint" value="2111"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_2112"
- name="%metatype.name.IntervalConstraint_2112"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="IntervalConstraint"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.IntervalConstraintEditHelper">
- <param name="semanticHint" value="2112"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_2113"
- name="%metatype.name.InteractionConstraint_2113"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InteractionConstraint"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InteractionConstraintEditHelper">
- <param name="semanticHint" value="2113"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"
- name="%metatype.name.Constraint_2114"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="2114"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Node_3121"
- name="%metatype.name.Node_3121"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3121"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Port_3069"
- name="%metatype.name.Port_3069"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Port"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.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.composite.Parameter_3088"
- name="%metatype.name.Parameter_3088"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Parameter"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ParameterEditHelper">
- <param name="semanticHint" value="3088"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Property_3070"
- name="%metatype.name.Property_3070"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Property"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.PropertyEditHelper">
- <param name="semanticHint" value="3070"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.prototype.CollaborationRole_3115"
- name="%metatype.name.ConnectableElement_3115"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ConnectableElement"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.CollaborationRoleEditHelper">
- <param name="semanticHint" value="3115"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.CollaborationUse_3071"
- name="%metatype.name.CollaborationUse_3071"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="CollaborationUse"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.CollaborationUseEditHelper">
- <param name="semanticHint" value="3071"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Activity_3072"
- name="%metatype.name.Activity_3072"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Activity_2060"/>
- <param name="semanticHint" value="3072"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Interaction_3073"
- name="%metatype.name.Interaction_3073"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Interaction_2061"/>
- <param name="semanticHint" value="3073"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_3074"
- name="%metatype.name.ProtocolStateMachine_3074"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_2062"/>
- <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.composite.StateMachine_3075"
- name="%metatype.name.StateMachine_3075"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.StateMachine_2063"/>
- <param name="semanticHint" value="3075"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_3076"
- name="%metatype.name.FunctionBehavior_3076"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_2064"/>
- <param name="semanticHint" value="3076"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_3077"
- name="%metatype.name.OpaqueBehavior_3077"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_2065"/>
- <param name="semanticHint" value="3077"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Component_3081"
- name="%metatype.name.Component_3081"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Component_2069"/>
- <param name="semanticHint" value="3081"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Device_3082"
- name="%metatype.name.Device_3082"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Device_2070"/>
- <param name="semanticHint" value="3082"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_3083"
- name="%metatype.name.ExecutionEnvironment_3083"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_2071"/>
- <param name="semanticHint" value="3083"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Node_3084"
- name="%metatype.name.Node_3084"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Node_2072"/>
- <param name="semanticHint" value="3084"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Class_3085"
- name="%metatype.name.Class_3085"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Class_2073"/>
- <param name="semanticHint" value="3085"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Collaboration_3086"
- name="%metatype.name.Collaboration_3086"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Collaboration"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.CollaborationEditHelper">
- <param name="semanticHint" value="3086"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Interface_3087"
- name="%metatype.name.Interface_3087"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="3087"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_3078"
- name="%metatype.name.PrimitiveType_3078"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_2066"/>
- <param name="semanticHint" value="3078"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Enumeration_3079"
- name="%metatype.name.Enumeration_3079"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.Enumeration_2067"/>
- <param name="semanticHint" value="3079"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.DataType_3080"
- name="%metatype.name.DataType_3080"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.composite.DataType_2068"/>
- <param name="semanticHint" value="3080"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Actor_3091"
- name="%metatype.name.Actor_3091"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Actor"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ActorEditHelper">
- <param name="semanticHint" value="3091"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_3092"
- name="%metatype.name.DeploymentSpecification_3092"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DeploymentSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DeploymentSpecificationEditHelper">
- <param name="semanticHint" value="3092"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Artifact_3093"
- name="%metatype.name.Artifact_3093"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Artifact"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ArtifactEditHelper">
- <param name="semanticHint" value="3093"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.InformationItem_3094"
- name="%metatype.name.InformationItem_3094"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InformationItem"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InformationItemEditHelper">
- <param name="semanticHint" value="3094"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Signal_3095"
- name="%metatype.name.Signal_3095"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Signal"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.SignalEditHelper">
- <param name="semanticHint" value="3095"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.UseCase_3096"
- name="%metatype.name.UseCase_3096"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="UseCase"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.UseCaseEditHelper">
- <param name="semanticHint" value="3096"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"
- name="%metatype.name.Comment_3097"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="3097"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_3116"
- name="%metatype.name.DurationConstraint_3116"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3116"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_3117"
- name="%metatype.name.TimeConstraint_3117"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3117"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_3118"
- name="%metatype.name.IntervalConstraint_3118"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3118"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_3119"
- name="%metatype.name.InteractionConstraint_3119"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3119"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"
- name="%metatype.name.Constraint_3120"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3120"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Property_3101"
- name="%metatype.name.Property_3101"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3101"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Operation_3102"
- name="%metatype.name.Operation_3102"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3102"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.EnumerationLiteral_3066"
- name="%metatype.name.EnumerationLiteral_3066"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="EnumerationLiteral"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.EnumerationLiteralEditHelper">
- <param name="semanticHint" value="3066"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Link_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.composite.Link_4001"
- name="%metatype.name.Link_4001"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4001"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"
- name="%metatype.name.CommentAnnotatedElement_4002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4002"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"
- name="%metatype.name.ConstraintConstrainedElement_4003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4003"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.ComponentRealization_4004"
- name="%metatype.name.ComponentRealization_4004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ComponentRealization"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ComponentRealizationEditHelper">
- <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.composite.InterfaceRealization_4005"
- name="%metatype.name.InterfaceRealization_4005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InterfaceRealization"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InterfaceRealizationEditHelper">
- <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.composite.Substitution_4011"
- name="%metatype.name.Substitution_4011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Substitution"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.SubstitutionEditHelper">
- <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.composite.Realization_4006"
- name="%metatype.name.Realization_4006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Realization"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.RealizationEditHelper">
- <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.composite.Manifestation_4012"
- name="%metatype.name.Manifestation_4012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Manifestation"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ManifestationEditHelper">
- <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.composite.Abstraction_4007"
- name="%metatype.name.Abstraction_4007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Abstraction"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.AbstractionEditHelper">
- <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.composite.Usage_4008"
- name="%metatype.name.Usage_4008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Usage"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.UsageEditHelper">
- <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.composite.Deployment_4009"
- name="%metatype.name.Deployment_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Deployment"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DeploymentEditHelper">
- <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.composite.RoleBinding_4017"
- name="%metatype.name.Dependency_4017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.RoleBindingEditHelper">
- <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.composite.Dependency_4010"
- name="%metatype.name.Dependency_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.DependencyEditHelper">
- <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.composite.Connector_4013"
- name="%metatype.name.Connector_4013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Connector"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.ConnectorEditHelper">
- <param name="semanticHint" value="4013"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.Generalization_4015"
- name="%metatype.name.Generalization_4015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="4015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.TimeObservationEvent_4018"
- name="%metatype.name.TimeObservationEvent_4018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.DurationObservationEvent_4019"
- name="%metatype.name.DurationObservationEvent_4019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4019"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"
- name="%metatype.name.InformationItemRepresented_4020"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4020"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021"
- name="%metatype.name.InformationFlow_4021"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InformationFlow"
- edithelper="org.eclipse.papyrus.uml.diagram.composite.edit.helpers.InformationFlowEditHelper">
- <param name="semanticHint" value="4021"/>
- </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.composite.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.composite.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.composite.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Activity_2060"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interaction_2061"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_2062"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StateMachine_2063"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_2064"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_2065"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Component_2069"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Device_2070"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_2071"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_2072"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Class_2073"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Collaboration_2075"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interface_2076"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_2066"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Enumeration_2067"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DataType_2068"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Actor_2077"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_2078"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Artifact_2079"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationItem_2080"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Signal_2081"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.UseCase_2082"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.SignalEvent_2083"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CallEvent_2084"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.AnyReceiveEvent_2085"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeEvent_2089"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationObservation_2093"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeObservation_2094"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralBoolean_2095"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralInteger_2096"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralNull_2097"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralString_2098"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralUnlimitedNatural_2099"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StringExpression_2100"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueExpression_2101"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeExpression_2102"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Expression_2103"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Duration_2104"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeInterval_2105"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationInterval_2106"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interval_2107"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InstanceValue_2108"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_2110"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_2111"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_2112"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_2113"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_3121"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Port_3069"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Parameter_3088"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Property_3070"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.prototype.CollaborationRole_3115"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CollaborationUse_3071"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Activity_3072"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interaction_3073"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_3074"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StateMachine_3075"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_3076"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_3077"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Component_3081"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Device_3082"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_3083"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_3084"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Class_3085"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Collaboration_3086"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interface_3087"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_3078"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Enumeration_3079"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DataType_3080"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Actor_3091"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_3092"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Artifact_3093"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationItem_3094"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Signal_3095"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.UseCase_3096"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_3116"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_3117"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_3118"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_3119"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Property_3101"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Operation_3102"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.EnumerationLiteral_3066"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Link_4022"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Link_4001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ComponentRealization_4004"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InterfaceRealization_4005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Substitution_4011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Realization_4006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Manifestation_4012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Usage_4008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Deployment_4009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.RoleBinding_4017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Dependency_4010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Connector_4013"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Generalization_4015"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeObservationEvent_4018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationObservationEvent_4019"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
@@ -1331,38 +199,38 @@
id="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram"
name="Create a new Composite Structure Diagram">
</command>
- </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.composite.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart"/>
- </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.composite.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.composite.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.composite.part.LoadResourceAction"/>
- </extension>
-
-<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
+ </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.composite.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart"/>
+ </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.composite.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.composite.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.composite.part.LoadResourceAction"/>
+ </extension>
+
+<extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
<extension
@@ -1376,65 +244,31 @@
</command>
</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.composite.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.composite.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
-
-<extension id="diagnostic" name="Papyrus Composite Structure 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.composite.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.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.composite.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.composite.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
+
+<extension id="diagnostic" name="Papyrus Composite Structure 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.composite.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">
-
- <metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
-
- <!-- Generalizarion specific advices (remove inconsistent views when a Generalization is deleted -->
- <adviceBinding id="org.eclipse.papyrus.uml.diagram.composite.GeneralizationHelperAdvice"
- class="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.GeneralizationHelperAdvice"
- inheritance="all" typeId="org.eclipse.papyrus.uml.Generalization">
- </adviceBinding>
-
- <!-- Property specific advices (remove inconsistent views when a Property type is set -->
- <adviceBinding id="org.eclipse.papyrus.uml.diagram.composite.PropertyHelperAdvice"
- class="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.PropertyHelperAdvice"
- inheritance="all" typeId="org.eclipse.papyrus.uml.Property">
- </adviceBinding>
-
- <!-- Collaboration specific advices (remove inconsistent views when a CollaborationRole is removed -->
- <adviceBinding id="org.eclipse.papyrus.uml.diagram.composite.CollaborationHelperAdvice"
- class="org.eclipse.papyrus.uml.diagram.composite.custom.helper.advice.CollaborationHelperAdvice"
- inheritance="all" typeId="org.eclipse.papyrus.uml.Collaboration">
- </adviceBinding>
-
- </metamodel>
-</extension>
<!-- UML ElementType bindings to Papyrus shared IClientContext -->
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
-
- <!-- Bindings declaration to shared IClientContext -->
- <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.GeneralizationHelperAdvice"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.PropertyHelperAdvice"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CollaborationHelperAdvice"/>
- </binding>
-
-</extension>
<extension
point="org.eclipse.ui.services">
@@ -1547,475 +381,517 @@
-<extension
- id="Papyrus Composite Structure Diagram .palettedefinition"
- name="Papyrus Composite Structure 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.composite.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 new Class"
- id="composite.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 new Property"
- id="composite.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 new Port"
- id="composite.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 new Collaboration"
- id="composite.tool.collaboration"
- kind="tool"
- label="Collaboration"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new CollaborationRole"
- id="composite.tool.collaborationrole"
- kind="tool"
- label="CollaborationRole"
- large_icon="icons/obj16/CollaborationRole.gif"
- path=""
- small_icon="icons/obj16/CollaborationRole.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new CollaborationUse"
- id="composite.tool.collaborationuse"
- kind="tool"
- label="CollaborationUse"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Comment"
- id="composite.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="composite.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 TimeObservation"
- id="composite.tool.timeobservation"
- 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 new DurationObservation"
- id="composite.tool.durationobservation"
- 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 new InformationItem"
- id="composite.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 new Parameter"
- id="composite.tool.parameter"
- kind="tool"
- label="Parameter"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Activity"
- id="composite.tool.activity"
- kind="tool"
- label="Activity"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Interaction"
- id="composite.tool.interaction"
- kind="tool"
- label="Interaction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new ProtocolStateMachine"
- id="composite.tool.protocolstatemachine"
- kind="tool"
- label="ProtocolStateMachine"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new StateMachine"
- id="composite.tool.statemachine"
- kind="tool"
- label="StateMachine"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new FunctionBehavior"
- id="composite.tool.functionbehavior"
- kind="tool"
- label="FunctionBehavior"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new OpaqueBehavior"
- id="composite.tool.opaquebehavior"
- kind="tool"
- label="OpaqueBehavior"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Link (Comment / Constraint)"
- id="composite.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="composite.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 new RoleBinding"
- id="composite.tool.rolebinding"
- kind="tool"
- label="RoleBinding"
- large_icon="icons/obj16/CollaborationRoleBinding.gif"
- path=""
- small_icon="icons/obj16/CollaborationRoleBinding.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Generalization"
- id="composite.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 Realization"
- id="composite.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 new Substitution"
- id="composite.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 new Abstraction"
- id="composite.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 new Usage"
- id="composite.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 new Dependency"
- id="composite.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 new representation for an InformationItem"
- id="composite.tool.representation"
- kind="tool"
- label="Representation"
- large_icon="icons/obj16/Representation.gif"
- path=""
- small_icon="icons/obj16/Representation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new InformationFlow"
- id="composite.tool.informationflow"
- kind="tool"
- label="InformationFlow"
- 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>
-
- </contribution>
- </paletteProvider>
-
- </extension>
-
-<extension
- id="Papyrus Composite Structure Diagram .standard"
- name="Papyrus Composite Structure 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.composite.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="composite.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="composite.tool.class"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.property"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.port"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.collaboration"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.collaborationrole"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.collaborationuse"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.comment"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.constraint"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.timeobservation"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.durationobservation"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.informationitem"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.parameter"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.activity"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.interaction"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.protocolstatemachine"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.statemachine"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.functionbehavior"
- path="/composite.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.opaquebehavior"
- path="/composite.group.nodes">
- </predefinedEntry>
- <entry
- description="Edges"
- id="composite.group.edges"
- 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="composite.tool.link"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.connector"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.rolebinding"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.generalization"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.realization"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.substitution"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.abstraction"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.usage"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.dependency"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.representation"
- path="/composite.group.edges">
- </predefinedEntry>
- <predefinedEntry
- id="composite.tool.informationflow"
- path="/composite.group.edges">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.composite"/>
- </paletteProvider>
-
-</extension>
+<extension
+ id="Papyrus Composite Structure Diagram .palettedefinition"
+ name="Papyrus Composite Structure 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.composite.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 new Class"
+ id="composite.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 new Property"
+ id="composite.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 new Port"
+ id="composite.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 new Collaboration"
+ id="composite.tool.collaboration"
+ kind="tool"
+ label="Collaboration"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Collaboration.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new CollaborationRole"
+ id="composite.tool.collaborationrole"
+ kind="tool"
+ label="CollaborationRole"
+ large_icon="icons/obj16/CollaborationRole.gif"
+ path=""
+ small_icon="icons/obj16/CollaborationRole.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new CollaborationUse"
+ id="composite.tool.collaborationuse"
+ kind="tool"
+ label="CollaborationUse"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Comment"
+ id="composite.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="composite.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 TimeObservation"
+ id="composite.tool.timeobservation"
+ 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 new DurationObservation"
+ id="composite.tool.durationobservation"
+ 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 new InformationItem"
+ id="composite.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 new Parameter"
+ id="composite.tool.parameter"
+ kind="tool"
+ label="Parameter"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Activity"
+ id="composite.tool.activity"
+ kind="tool"
+ label="Activity"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Interaction"
+ id="composite.tool.interaction"
+ kind="tool"
+ label="Interaction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new ProtocolStateMachine"
+ id="composite.tool.protocolstatemachine"
+ kind="tool"
+ label="ProtocolStateMachine"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProtocolStateMachine.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new StateMachine"
+ id="composite.tool.statemachine"
+ kind="tool"
+ label="StateMachine"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateMachine.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new FunctionBehavior"
+ id="composite.tool.functionbehavior"
+ kind="tool"
+ label="FunctionBehavior"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FunctionBehavior.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new OpaqueBehavior"
+ id="composite.tool.opaquebehavior"
+ kind="tool"
+ label="OpaqueBehavior"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueBehavior.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new StringExpression"
+ id="composite.tool.stringExpression"
+ kind="tool"
+ label="StringExpression"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StringExpression.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StringExpression.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Link (Comment / Constraint)"
+ id="composite.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="composite.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 new RoleBinding"
+ id="composite.tool.rolebinding"
+ kind="tool"
+ label="RoleBinding"
+ large_icon="icons/obj16/CollaborationRoleBinding.gif"
+ path=""
+ small_icon="icons/obj16/CollaborationRoleBinding.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Generalization"
+ id="composite.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 Realization"
+ id="composite.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 new Substitution"
+ id="composite.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 new Abstraction"
+ id="composite.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 new Usage"
+ id="composite.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 new Dependency"
+ id="composite.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 new representation for an InformationItem"
+ id="composite.tool.representation"
+ kind="tool"
+ label="Representation"
+ large_icon="icons/obj16/Representation.gif"
+ path=""
+ small_icon="icons/obj16/Representation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new InformationFlow"
+ id="composite.tool.informationflow"
+ kind="tool"
+ label="InformationFlow"
+ 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 new Manifestation"
+ id="composite.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 new Deployment"
+ id="composite.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>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
+
+<extension
+ id="Papyrus Composite Structure Diagram .standard"
+ name="Papyrus Composite Structure 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.composite.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="composite.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="composite.tool.class"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.property"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.port"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.collaboration"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.collaborationrole"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.collaborationuse"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.comment"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.constraint"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.timeobservation"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.durationobservation"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.informationitem"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.parameter"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.activity"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.interaction"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.protocolstatemachine"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.statemachine"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.functionbehavior"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.opaquebehavior"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.stringExpression"
+ path="/composite.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Edges"
+ id="composite.group.edges"
+ 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="composite.tool.link"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.connector"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.rolebinding"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.generalization"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.realization"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.substitution"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.abstraction"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.usage"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.dependency"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.representation"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.informationflow"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.manifestation"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ <predefinedEntry
+ id="composite.tool.deployment"
+ path="/composite.group.edges">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.composite"/>
+ </paletteProvider>
+
+</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
<diagramMappings diagramID="CompositeStructure">
@@ -2366,5 +1242,146 @@
getSemanticChildren="org.eclipse.papyrus.uml.diagram.composite.SynchroSemanticForPopertyPartCompartment">
</semanticChild>
</extension>
+<extension
+ point="org.eclipse.papyrus.infra.elementtypesconfigurations.elementTypeSetConfiguration">
+ <elementTypeSet
+ id="org.eclipse.papyrus.uml.diagram.composite.elementTypeSet"
+ path="model/compositediagram.elementtypesconfigurations">
+ </elementTypeSet>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.elementtypesconfigurations.elementTypeSetConfiguration">
+ <elementTypeSet
+ id="org.eclipse.papyrus.uml.diagram.composite.elementTypeSetNotation"
+ path="model/compositediagram-notation.elementtypesconfigurations">
+ </elementTypeSet>
+</extension>
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ </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.composite.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.composite.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.composite.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Package_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Activity_2060"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interaction_2061"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_2062"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StateMachine_2063"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_2064"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_2065"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Component_2069"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Device_2070"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_2071"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_2072"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Class_2073"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Collaboration_2075"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interface_2076"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_2066"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Enumeration_2067"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DataType_2068"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Actor_2077"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_2078"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Artifact_2079"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationItem_2080"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Signal_2081"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.UseCase_2082"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.SignalEvent_2083"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CallEvent_2084"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.AnyReceiveEvent_2085"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeEvent_2089"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationObservation_2093"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeObservation_2094"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralBoolean_2095"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralInteger_2096"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralNull_2097"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralString_2098"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.LiteralUnlimitedNatural_2099"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StringExpression_2100"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueExpression_2101"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeExpression_2102"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Expression_2103"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Duration_2104"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeInterval_2105"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationInterval_2106"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interval_2107"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InstanceValue_2108"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_2110"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_2111"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_2112"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_2113"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_3121"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Port_3069"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Parameter_3088"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Property_3070"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CollaborationRole_3115"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CollaborationUse_3071"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Activity_3072"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interaction_3073"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ProtocolStateMachine_3074"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.StateMachine_3075"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.FunctionBehavior_3076"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.OpaqueBehavior_3077"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Component_3081"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Device_3082"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ExecutionEnvironment_3083"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Node_3084"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Class_3085"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Collaboration_3086"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Interface_3087"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.PrimitiveType_3078"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Enumeration_3079"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DataType_3080"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Actor_3091"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DeploymentSpecification_3092"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Artifact_3093"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationItem_3094"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Signal_3095"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.UseCase_3096"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationConstraint_3116"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeConstraint_3117"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.IntervalConstraint_3118"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InteractionConstraint_3119"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Property_3101"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Operation_3102"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.EnumerationLiteral_3066"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Link_4022"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Link_4001"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.ComponentRealization_4004"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InterfaceRealization_4005"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Substitution_4011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Realization_4006"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Manifestation_4012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Usage_4008"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Deployment_4009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.RoleBinding_4017"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Dependency_4010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Connector_4013"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Generalization_4015"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.TimeObservationEvent_4018"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.DurationObservationEvent_4019"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.Representation_4020"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
+
+
+
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java
deleted file mode 100644
index 58d47ff856a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java
+++ /dev/null
@@ -1,50 +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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.uml.diagram.synchronizeview.customization.ISynchroSemanticChild;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * This class is used to precise semantic element that could be displayed in compartment of parts
- */
-public class SynchroSemanticForPopertyPartCompartment implements ISynchroSemanticChild {
-
- public SynchroSemanticForPopertyPartCompartment() {
- }
-
- @Override
- public List<EObject> getSynchroSemanticChild(EObject semanticFromEditPart) {
- ArrayList<EObject> result = new ArrayList<EObject>();
- if (semanticFromEditPart instanceof Property) {
- if (((Property) semanticFromEditPart).getType() != null) {
- result.addAll(((Property) semanticFromEditPart).getType().getOwnedElements());
- }
- }
- return result;
- }
-
- @Override
- public EObject getSemanticEObjectToListen(EObject semanticFromEditPart) {
- if (semanticFromEditPart instanceof Property) {
- if (((Property) semanticFromEditPart).getType() != null) {
- return ((Property) semanticFromEditPart).getType();
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java
deleted file mode 100644
index 6a2e59aed74..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Abstraction;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class AbstractionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public AbstractionCreateCommand(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().canCreateAbstraction_4007(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$
- }
-
- Abstraction newElement = UMLFactory.eINSTANCE.createAbstraction();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Abstraction_4007(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionReorientCommand.java
deleted file mode 100644
index 99b647ff319..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Abstraction;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class AbstractionReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public AbstractionReorientCommand(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 Abstraction) {
- 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().canExistAbstraction_4007(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().canExistAbstraction_4007(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 Abstraction getLink() {
- return (Abstraction) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java
deleted file mode 100644
index 7acdcaa1b0f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Activity;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ActivityCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ActivityCompositeCreateCommand(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.getActivity());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Activity newElement = UMLFactory.eINSTANCE.createActivity();
-
- 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_Activity_2060(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Activity 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java
deleted file mode 100644
index 38d2f2978b6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Activity;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ActivityCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ActivityCompositeCreateCommandCN(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.getActivity());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Activity newElement = UMLFactory.eINSTANCE.createActivity();
-
- 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_Activity_3072(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Activity 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java
deleted file mode 100644
index fa759fb9fb2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Actor;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ActorCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ActorCreateCommand(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.getActor());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Actor newElement = UMLFactory.eINSTANCE.createActor();
-
- 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_Actor_2077(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Actor 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java
deleted file mode 100644
index 45cc0b38e79..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Actor;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ActorCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ActorCreateCommandCN(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.getActor());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Actor newElement = UMLFactory.eINSTANCE.createActor();
-
- 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_Actor_3091(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Actor 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java
deleted file mode 100644
index 744f0df133d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.AnyReceiveEvent;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class AnyReceiveEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public AnyReceiveEventCreateCommand(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.getAnyReceiveEvent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- AnyReceiveEvent newElement = UMLFactory.eINSTANCE.createAnyReceiveEvent();
-
- 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_AnyReceiveEvent_2085(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(AnyReceiveEvent 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java
deleted file mode 100644
index eab8c17ca12..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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_2079(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java
deleted file mode 100644
index f0e6aef09c6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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_3093(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java
deleted file mode 100644
index 89ffdf5327a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.CallEvent;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CallEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CallEventCreateCommand(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.getCallEvent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- CallEvent newElement = UMLFactory.eINSTANCE.createCallEvent();
-
- 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_CallEvent_2084(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CallEvent 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java
deleted file mode 100644
index dc6aa627b43..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ChangeEvent;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ChangeEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ChangeEventCreateCommand(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.getChangeEvent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ChangeEvent newElement = UMLFactory.eINSTANCE.createChangeEvent();
-
- 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_ChangeEvent_2088(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ChangeEvent 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java
deleted file mode 100644
index 12515f98ed9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ClassCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ClassCompositeCreateCommand(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.getClass_());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Class newElement = UMLFactory.eINSTANCE.createClass();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (data.isPathDefined()) {
- if (!data.execute(target, newElement)) {
- return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
- }
- } else {
-
- Package qualifiedTarget = (Package) target;
- qualifiedTarget.getPackagedElements()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Class_2073(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Class newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java
deleted file mode 100644
index f4a5d611029..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,126 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ClassCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ClassCompositeCreateCommandCN(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.getClass_());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Class newElement = UMLFactory.eINSTANCE.createClass();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (data.isPathDefined()) {
- if (!data.execute(target, newElement)) {
- return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
- }
- } else {
-
- Class qualifiedTarget = (Class) target;
- qualifiedTarget.getNestedClassifiers()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Class_3085(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Class newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java
deleted file mode 100644
index 2fbf21854a5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CollaborationCompositeCreateCommand(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.getCollaboration());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
-
- 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_Collaboration_2075(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Collaboration 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java
deleted file mode 100644
index fc26763c477..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CollaborationCompositeCreateCommandCN(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.getCollaboration());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
-
- 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_Collaboration_3086(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Collaboration 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java
deleted file mode 100644
index 558672375e4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.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.composite.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.ConnectableElement;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CollaborationRoleCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CollaborationRoleCreateCommandCN(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.getConnectableElement());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ConnectableElement 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java
deleted file mode 100644
index 98b8e511f26..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.CollaborationUse;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CollaborationUseCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CollaborationUseCreateCommandCN(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.getCollaborationUse());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- CollaborationUse newElement = UMLFactory.eINSTANCE.createCollaborationUse();
-
- 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 {
-
- Classifier qualifiedTarget = (Classifier) target;
- qualifiedTarget.getCollaborationUses()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_CollaborationUse_3071(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CollaborationUse 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java
deleted file mode 100644
index ebd0745e2e0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ /dev/null
@@ -1,108 +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.composite.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.composite.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_4002(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementReorientCommand.java
deleted file mode 100644
index 8536d42b66e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ /dev/null
@@ -1,165 +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.composite.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.composite.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_4002(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4002(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java
deleted file mode 100644
index 066e2ff7af1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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_2109(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java
deleted file mode 100644
index 4b92696a8ab..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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_3097(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java
deleted file mode 100644
index 0e0fb5cfe55..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ComponentCompositeCreateCommand(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.getComponent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Component newElement = UMLFactory.eINSTANCE.createComponent();
-
- 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_Component_2069(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java
deleted file mode 100644
index a4f390fe7d2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ComponentCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ComponentCompositeCreateCommandCN(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.getComponent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Component newElement = UMLFactory.eINSTANCE.createComponent();
-
- 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_Component_3081(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java
deleted file mode 100644
index fcdd6f82dc3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ComponentRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class ComponentRealizationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public ComponentRealizationCreateCommand(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().canCreateComponentRealization_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$
- }
-
- ComponentRealization newElement = UMLFactory.eINSTANCE.createComponentRealization();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_ComponentRealization_4004(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationReorientCommand.java
deleted file mode 100644
index cd3d91572b1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.ComponentRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class ComponentRealizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ComponentRealizationReorientCommand(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 ComponentRealization) {
- 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().canExistComponentRealization_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().canExistComponentRealization_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 ComponentRealization getLink() {
- return (ComponentRealization) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java
deleted file mode 100644
index ed920fd120f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Connector;
-import org.eclipse.uml2.uml.ConnectorEnd;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class ConnectorCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected StructuredClassifier container;
-
- /**
- * @generated
- */
- public ConnectorCreateCommand(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 ConnectorEnd) {
- return false;
- }
- if (target != null && false == target instanceof ConnectorEnd) {
- 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().canCreateConnector_4013(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$
- }
-
- Connector newElement = UMLFactory.eINSTANCE.createConnector();
- getContainer().getOwnedConnectors()
- .add(newElement);
- newElement.getEnds()
- .add(getSource());
- newElement.getEnds()
- .add(getTarget());
- ElementInitializers.getInstance().init_Connector_4013(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- 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());
- 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 ConnectorEnd getSource() {
- return (ConnectorEnd) source;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getTarget() {
- return (ConnectorEnd) target;
- }
-
- /**
- * @generated
- */
- public StructuredClassifier getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected StructuredClassifier 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 StructuredClassifier) {
- return (StructuredClassifier) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorReorientCommand.java
deleted file mode 100644
index f5497572f48..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Connector;
-import org.eclipse.uml2.uml.ConnectorEnd;
-import org.eclipse.uml2.uml.StructuredClassifier;
-
-/**
- * @generated
- */
-public class ConnectorReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ConnectorReorientCommand(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 Connector) {
- 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 ConnectorEnd && newEnd instanceof ConnectorEnd)) {
- return false;
- }
- if (getLink().getEnds()
- .size() != 1) {
- return false;
- }
- ConnectorEnd target = getLink().getEnds()
- .get(0);
- if (!(getLink().eContainer() instanceof StructuredClassifier)) {
- return false;
- }
- StructuredClassifier container = (StructuredClassifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConnector_4013(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof ConnectorEnd && newEnd instanceof ConnectorEnd)) {
- return false;
- }
- if (getLink().getEnds()
- .size() != 1) {
- return false;
- }
- ConnectorEnd source = getLink().getEnds()
- .get(0);
- if (!(getLink().eContainer() instanceof StructuredClassifier)) {
- return false;
- }
- StructuredClassifier container = (StructuredClassifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConnector_4013(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().getEnds()
- .remove(getOldSource());
- getLink().getEnds()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getEnds()
- .remove(getOldTarget());
- getLink().getEnds()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Connector getLink() {
- return (Connector) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getOldSource() {
- return (ConnectorEnd) oldEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getNewSource() {
- return (ConnectorEnd) newEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getOldTarget() {
- return (ConnectorEnd) oldEnd;
- }
-
- /**
- * @generated
- */
- protected ConnectorEnd getNewTarget() {
- return (ConnectorEnd) newEnd;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java
deleted file mode 100644
index a391f9cf5ee..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ /dev/null
@@ -1,108 +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.composite.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.composite.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_4003(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementReorientCommand.java
deleted file mode 100644
index 8f64ecdfdab..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ /dev/null
@@ -1,165 +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.composite.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.composite.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_4003(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4003(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java
deleted file mode 100644
index 7fd1b8e43b8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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 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 {
-
- 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_2114(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java
deleted file mode 100644
index e383b0f8e5a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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_3120(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java
deleted file mode 100644
index 87d453990af..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DataTypeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DataTypeCreateCommand(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.getDataType());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_DataType_2068(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DataType 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java
deleted file mode 100644
index 6f21fee4684..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DataTypeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DataTypeCreateCommandCN(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.getDataType());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_DataType_3080(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DataType 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java
deleted file mode 100644
index 12b31d4965f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.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_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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyReorientCommand.java
deleted file mode 100644
index 282c09d3662..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.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_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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java
deleted file mode 100644
index 0a48fe3ab5b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DeploymentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package 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_4009(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().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Deployment_4009(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 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentReorientCommand.java
deleted file mode 100644
index ba38f943933..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @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 Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDeployment_4009(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().canExistDeployment_4009(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java
deleted file mode 100644
index 6e79dcfc56a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DeploymentSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeploymentSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeploymentSpecificationCreateCommand(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.getDeploymentSpecification());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
-
- 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_DeploymentSpecification_2078(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DeploymentSpecification 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java
deleted file mode 100644
index 8a0295c4f3a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.DeploymentSpecification;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeploymentSpecificationCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeploymentSpecificationCreateCommandCN(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.getDeploymentSpecification());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
-
- 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_DeploymentSpecification_3092(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DeploymentSpecification 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java
deleted file mode 100644
index 40d61ad5677..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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 DeviceCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeviceCompositeCreateCommand(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_2070(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java
deleted file mode 100644
index 83b1bbc22e8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeviceCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeviceCompositeCreateCommandCN(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 {
-
- Class qualifiedTarget = (Class) target;
- qualifiedTarget.getNestedClassifiers()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Device_3082(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java
deleted file mode 100644
index a1a169168f7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DurationConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(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.getDurationConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
- 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_DurationConstraint_2110(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java
deleted file mode 100644
index f2a7d6bdcf8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DurationConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommandCN(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.getDurationConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
- 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_DurationConstraint_3116(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java
deleted file mode 100644
index 3bb0f8740f4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Duration;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DurationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationCreateCommand(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.getDuration());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Duration newElement = UMLFactory.eINSTANCE.createDuration();
-
- 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_Duration_2104(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Duration 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java
deleted file mode 100644
index 115201adef6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DurationInterval;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DurationIntervalCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationIntervalCreateCommand(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.getDurationInterval());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationInterval newElement = UMLFactory.eINSTANCE.createDurationInterval();
-
- 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_DurationInterval_2106(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationInterval 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java
deleted file mode 100644
index fb223bfe34c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DurationObservationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(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.getDurationObservation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
-
- 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_DurationObservation_2093(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationObservation 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java
deleted file mode 100644
index 947170acb69..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java
+++ /dev/null
@@ -1,108 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * @generated
- */
-public class DurationObservationEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public DurationObservationEventCreateCommand(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 DurationObservation) {
- 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
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDurationObservationEvent_4019(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().getEvents()
- .add(getTarget());
- }
- return CommandResult.newOKCommandResult();
-
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected DurationObservation getSource() {
- return (DurationObservation) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventReorientCommand.java
deleted file mode 100644
index 55f88c9f503..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventReorientCommand.java
+++ /dev/null
@@ -1,165 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * @generated
- */
-public class DurationObservationEventReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public DurationObservationEventReorientCommand(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 DurationObservation) {
- 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 DurationObservation)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDurationObservationEvent_4019(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDurationObservationEvent_4019(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().getEvents()
- .remove(getOldTarget());
- getNewSource().getEvents()
- .add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getEvents()
- .remove(getOldTarget());
- getOldSource().getEvents()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected DurationObservation getOldSource() {
- return (DurationObservation) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected DurationObservation getNewSource() {
- return (DurationObservation) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java
deleted file mode 100644
index 456d271a7e4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class EnumerationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public EnumerationCreateCommand(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.getEnumeration());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_Enumeration_2067(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Enumeration 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java
deleted file mode 100644
index 709315b1f60..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class EnumerationCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public EnumerationCreateCommandCN(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.getEnumeration());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_Enumeration_3079(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Enumeration 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java
deleted file mode 100644
index e70a0ca036b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class EnumerationLiteralCreateCommandCLN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public EnumerationLiteralCreateCommandCLN(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.getEnumerationLiteral());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- Enumeration qualifiedTarget = (Enumeration) target;
- qualifiedTarget.getOwnedLiterals()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_EnumerationLiteral_3066(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(EnumerationLiteral 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java
deleted file mode 100644
index 934c8511c1b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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 ExecutionEnvironmentCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCreateCommand(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_2071(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java
deleted file mode 100644
index 72509273344..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCreateCommandCN(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 {
-
- Class qualifiedTarget = (Class) target;
- qualifiedTarget.getNestedClassifiers()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_ExecutionEnvironment_3083(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java
deleted file mode 100644
index d12098fcfab..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Expression;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExpressionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ExpressionCreateCommand(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.getExpression());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Expression newElement = UMLFactory.eINSTANCE.createExpression();
-
- 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_Expression_2103(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Expression 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java
deleted file mode 100644
index 199596d7dd2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.FunctionBehavior;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCreateCommand(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.getFunctionBehavior());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
-
- 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_FunctionBehavior_2064(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(FunctionBehavior 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java
deleted file mode 100644
index ef708e95865..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.FunctionBehavior;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCreateCommandCN(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.getFunctionBehavior());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
-
- 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_FunctionBehavior_3076(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(FunctionBehavior 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java
deleted file mode 100644
index 8bcc9233b21..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java
+++ /dev/null
@@ -1,170 +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.composite.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.composite.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_4015(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationReorientCommand.java
deleted file mode 100644
index 44007bb86ac..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationReorientCommand.java
+++ /dev/null
@@ -1,174 +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.composite.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.composite.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_4015(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_4015(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java
deleted file mode 100644
index d240f2b22e0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InformationFlow;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class InformationFlowCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public InformationFlowCreateCommand(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().canCreateInformationFlow_4021(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$
- }
-
- InformationFlow newElement = UMLFactory.eINSTANCE.createInformationFlow();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getInformationSources()
- .add(getSource());
- newElement.getInformationTargets()
- .add(getTarget());
- ElementInitializers.getInstance().init_InformationFlow_4021(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InformationFlow 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowReorientCommand.java
deleted file mode 100644
index 51daa602f5c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.InformationFlow;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class InformationFlowReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public InformationFlowReorientCommand(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 InformationFlow) {
- 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().getInformationTargets()
- .size() != 1) {
- return false;
- }
- NamedElement target = getLink().getInformationTargets()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistInformationFlow_4021(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getInformationSources()
- .size() != 1) {
- return false;
- }
- NamedElement source = getLink().getInformationSources()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistInformationFlow_4021(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().getInformationSources()
- .remove(getOldSource());
- getLink().getInformationSources()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getInformationTargets()
- .remove(getOldTarget());
- getLink().getInformationTargets()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected InformationFlow getLink() {
- return (InformationFlow) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java
deleted file mode 100644
index 05c80ab5420..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InformationItem;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InformationItemCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InformationItemCreateCommand(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.getInformationItem());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
-
- 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_InformationItem_2080(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InformationItem 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java
deleted file mode 100644
index 8d304df6c33..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.InformationItem;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InformationItemCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InformationItemCreateCommandCN(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.getInformationItem());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
-
- 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_InformationItem_3094(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InformationItem 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java
deleted file mode 100644
index 1b299639e92..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InstanceValue;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InstanceValueCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InstanceValueCreateCommand(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.getInstanceValue());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- InstanceValue newElement = UMLFactory.eINSTANCE.createInstanceValue();
-
- 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_InstanceValue_2108(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InstanceValue 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java
deleted file mode 100644
index 7dc89ba9adf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InteractionCompositeCreateCommand(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.getInteraction());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
-
- 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_Interaction_2061(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Interaction 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java
deleted file mode 100644
index f78e10a932a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InteractionCompositeCreateCommandCN(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.getInteraction());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
-
- 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_Interaction_3073(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Interaction 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java
deleted file mode 100644
index d2055558e88..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InteractionConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InteractionConstraintCreateCommand(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.getInteractionConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
-
- 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_InteractionConstraint_2113(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InteractionConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java
deleted file mode 100644
index 331473fee5a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InteractionConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InteractionConstraintCreateCommandCN(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.getInteractionConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
-
- 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_InteractionConstraint_3119(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InteractionConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java
deleted file mode 100644
index 8c6e483e5c4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InterfaceCreateCommand(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.getInterface());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
- 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_Interface_2076(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java
deleted file mode 100644
index cfba0a72601..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Interface;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InterfaceCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InterfaceCreateCommandCN(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.getInterface());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
- 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_Interface_3087(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java
deleted file mode 100644
index 1af9688ffde..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.InterfaceRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class InterfaceRealizationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public InterfaceRealizationCreateCommand(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().canCreateInterfaceRealization_4005(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$
- }
-
- InterfaceRealization newElement = UMLFactory.eINSTANCE.createInterfaceRealization();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_InterfaceRealization_4005(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationReorientCommand.java
deleted file mode 100644
index 852fc87de2d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.InterfaceRealization;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class InterfaceRealizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public InterfaceRealizationReorientCommand(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 InterfaceRealization) {
- 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().canExistInterfaceRealization_4005(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().canExistInterfaceRealization_4005(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 InterfaceRealization getLink() {
- return (InterfaceRealization) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java
deleted file mode 100644
index 0a96e29024c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class IntervalConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public IntervalConstraintCreateCommand(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.getIntervalConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
-
- 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_IntervalConstraint_2112(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(IntervalConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java
deleted file mode 100644
index 3a4397ff2ad..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class IntervalConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public IntervalConstraintCreateCommandCN(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.getIntervalConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
-
- 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_IntervalConstraint_3118(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(IntervalConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java
deleted file mode 100644
index f884b2e087b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interval;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class IntervalCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public IntervalCreateCommand(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.getInterval());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Interval newElement = UMLFactory.eINSTANCE.createInterval();
-
- 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_Interval_2107(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Interval 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java
deleted file mode 100644
index 946acc207de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.LiteralBoolean;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LiteralBooleanCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LiteralBooleanCreateCommand(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.getLiteralBoolean());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- LiteralBoolean newElement = UMLFactory.eINSTANCE.createLiteralBoolean();
-
- 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_LiteralBoolean_2095(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(LiteralBoolean 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java
deleted file mode 100644
index cc7643119d0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.LiteralInteger;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LiteralIntegerCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LiteralIntegerCreateCommand(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.getLiteralInteger());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- LiteralInteger newElement = UMLFactory.eINSTANCE.createLiteralInteger();
-
- 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_LiteralInteger_2096(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(LiteralInteger 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java
deleted file mode 100644
index a66350229c6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.LiteralNull;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LiteralNullCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LiteralNullCreateCommand(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.getLiteralNull());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- LiteralNull newElement = UMLFactory.eINSTANCE.createLiteralNull();
-
- 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_LiteralNull_2097(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(LiteralNull 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java
deleted file mode 100644
index 21aa00c12bc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LiteralStringCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LiteralStringCreateCommand(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.getLiteralString());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- LiteralString newElement = UMLFactory.eINSTANCE.createLiteralString();
-
- 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_LiteralString_2098(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(LiteralString 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java
deleted file mode 100644
index d0ad24c4a58..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LiteralUnlimitedNaturalCreateCommand(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.getLiteralUnlimitedNatural());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- LiteralUnlimitedNatural newElement = UMLFactory.eINSTANCE.createLiteralUnlimitedNatural();
-
- 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_LiteralUnlimitedNatural_2099(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(LiteralUnlimitedNatural 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java
deleted file mode 100644
index 98e8b232ee0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class ManifestationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package 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_4012(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().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Manifestation_4012(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 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationReorientCommand.java
deleted file mode 100644
index 29fb1d7f210..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @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 Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4012(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().canExistManifestation_4012(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java
deleted file mode 100644
index f2e43b0beab..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.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 NodeCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NodeCompositeCreateCommand(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_2072(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java
deleted file mode 100644
index ef976cf2997..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NodeCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NodeCompositeCreateCommandCN(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 {
-
- Class qualifiedTarget = (Class) target;
- qualifiedTarget.getNestedClassifiers()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Node_3084(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java
deleted file mode 100644
index 54c71ba5575..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.OpaqueBehavior;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCreateCommand(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.getOpaqueBehavior());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
-
- 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_OpaqueBehavior_2065(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(OpaqueBehavior 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java
deleted file mode 100644
index b5d9afbcba5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.OpaqueBehavior;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCreateCommandCN(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.getOpaqueBehavior());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
-
- 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_OpaqueBehavior_3077(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(OpaqueBehavior 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java
deleted file mode 100644
index 3e110d866a4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.OpaqueExpression;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class OpaqueExpressionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public OpaqueExpressionCreateCommand(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.getOpaqueExpression());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- OpaqueExpression newElement = UMLFactory.eINSTANCE.createOpaqueExpression();
-
- 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_OpaqueExpression_2101(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(OpaqueExpression 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java
deleted file mode 100644
index 77db9b80e22..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class OperationCreateCommandCLN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public OperationCreateCommandCLN(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.getOperation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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.getOwnedOperations()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Operation_3102(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java
deleted file mode 100644
index 4537d7e4dfb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ParameterCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ParameterCreateCommand(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.getParameter());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Parameter newElement = UMLFactory.eINSTANCE.createParameter();
-
- 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 {
-
- Behavior qualifiedTarget = (Behavior) target;
- qualifiedTarget.getOwnedParameters()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Parameter_3088(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Parameter 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java
deleted file mode 100644
index 02c4585de94..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PortCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PortCreateCommand(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.getPort());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Port newElement = UMLFactory.eINSTANCE.createPort();
-
- 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 {
-
- StructuredClassifier qualifiedTarget = (StructuredClassifier) target;
- qualifiedTarget.getOwnedAttributes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Port_3069(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Port 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java
deleted file mode 100644
index 72ee3289231..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PrimitiveType;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PrimitiveTypeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PrimitiveTypeCreateCommand(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.getPrimitiveType());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_PrimitiveType_2066(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(PrimitiveType newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java
deleted file mode 100644
index a3ae7900d4d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.PrimitiveType;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PrimitiveTypeCreateCommandCN(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.getPrimitiveType());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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_PrimitiveType_3078(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(PrimitiveType newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java
deleted file mode 100644
index e3838a8e81f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PropertyCreateCommandCLN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PropertyCreateCommandCLN(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.getProperty());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- StructuredClassifier qualifiedTarget = (StructuredClassifier) target;
- qualifiedTarget.getOwnedAttributes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Property_3101(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java
deleted file mode 100644
index 6e46c365cd4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PropertyPartCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PropertyPartCreateCommandCN(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.getProperty());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- 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 {
-
- StructuredClassifier qualifiedTarget = (StructuredClassifier) target;
- qualifiedTarget.getOwnedAttributes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Property_3070(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java
deleted file mode 100644
index 76ff439b104..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.ProtocolStateMachine;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCreateCommand(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.getProtocolStateMachine());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
-
- 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_ProtocolStateMachine_2062(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ProtocolStateMachine 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java
deleted file mode 100644
index d25cb7d359b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.ProtocolStateMachine;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCreateCommandCN(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.getProtocolStateMachine());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
-
- 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_ProtocolStateMachine_3074(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ProtocolStateMachine 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java
deleted file mode 100644
index 1cb52273fae..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Realization;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class RealizationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public RealizationCreateCommand(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().canCreateRealization_4006(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$
- }
-
- Realization newElement = UMLFactory.eINSTANCE.createRealization();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Realization_4006(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Realization 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationReorientCommand.java
deleted file mode 100644
index d5d442ff3ac..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Realization;
-
-/**
- * @generated
- */
-public class RealizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public RealizationReorientCommand(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 Realization) {
- 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().canExistRealization_4006(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().canExistRealization_4006(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 Realization getLink() {
- return (Realization) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java
deleted file mode 100644
index 936ca225258..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java
+++ /dev/null
@@ -1,108 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.InformationItem;
-
-/**
- * @generated
- */
-public class RepresentationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public RepresentationCreateCommand(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 InformationItem) {
- 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
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateInformationItemRepresented_4020(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().getRepresenteds()
- .add(getTarget());
- }
- return CommandResult.newOKCommandResult();
-
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected InformationItem getSource() {
- return (InformationItem) source;
- }
-
- /**
- * @generated
- */
- protected Classifier getTarget() {
- return (Classifier) target;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationReorientCommand.java
deleted file mode 100644
index 472cb220d9e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationReorientCommand.java
+++ /dev/null
@@ -1,165 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.InformationItem;
-
-/**
- * @generated
- */
-public class RepresentationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public RepresentationReorientCommand(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 InformationItem) {
- 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 InformationItem)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistInformationItemRepresented_4020(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Classifier && newEnd instanceof Classifier)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistInformationItemRepresented_4020(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().getRepresenteds()
- .remove(getOldTarget());
- getNewSource().getRepresenteds()
- .add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getRepresenteds()
- .remove(getOldTarget());
- getOldSource().getRepresenteds()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected InformationItem getOldSource() {
- return (InformationItem) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected InformationItem getNewSource() {
- return (InformationItem) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java
deleted file mode 100644
index c5b2dae8681..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java
+++ /dev/null
@@ -1,169 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-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 RoleBindingCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public RoleBindingCreateCommand(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_4017(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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingReorientCommand.java
deleted file mode 100644
index 87712830b9c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class RoleBindingReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public RoleBindingReorientCommand(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_4017(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_4017(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java
deleted file mode 100644
index ee7c76ed3ac..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class SignalCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public SignalCreateCommand(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.getSignal());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Signal newElement = UMLFactory.eINSTANCE.createSignal();
-
- 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_Signal_2081(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Signal 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java
deleted file mode 100644
index a0e302f68ec..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class SignalCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public SignalCreateCommandCN(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.getSignal());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Signal newElement = UMLFactory.eINSTANCE.createSignal();
-
- 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_Signal_3095(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Signal 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java
deleted file mode 100644
index 571edaffbc2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.SignalEvent;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class SignalEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public SignalEventCreateCommand(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.getSignalEvent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- SignalEvent newElement = UMLFactory.eINSTANCE.createSignalEvent();
-
- 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_SignalEvent_2083(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(SignalEvent 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java
deleted file mode 100644
index cced801abc4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.StateMachine;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public StateMachineCompositeCreateCommand(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.getStateMachine());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
-
- 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_StateMachine_2063(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(StateMachine 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java
deleted file mode 100644
index dc54122595c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.StateMachine;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public StateMachineCompositeCreateCommandCN(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.getStateMachine());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
-
- 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_StateMachine_3075(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(StateMachine 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java
deleted file mode 100644
index f4a022d5331..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.StringExpression;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class StringExpressionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public StringExpressionCreateCommand(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.getStringExpression());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- StringExpression newElement = UMLFactory.eINSTANCE.createStringExpression();
-
- 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_StringExpression_2100(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(StringExpression 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java
deleted file mode 100644
index be362d2c41a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Substitution;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class SubstitutionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public SubstitutionCreateCommand(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().canCreateSubstitution_4011(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$
- }
-
- Substitution newElement = UMLFactory.eINSTANCE.createSubstitution();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Substitution_4011(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- 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());
- 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionReorientCommand.java
deleted file mode 100644
index b4e349534b3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Substitution;
-
-/**
- * @generated
- */
-public class SubstitutionReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public SubstitutionReorientCommand(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 Substitution) {
- 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().canExistSubstitution_4011(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().canExistSubstitution_4011(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 Substitution getLink() {
- return (Substitution) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java
deleted file mode 100644
index b5fe60584a0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeConstraintCreateCommand(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.getTimeConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
-
- 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_TimeConstraint_2111(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java
deleted file mode 100644
index 12042a8b2f9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeConstraintCreateCommandCN(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.getTimeConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
-
- 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_TimeConstraint_3117(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeConstraint 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java
deleted file mode 100644
index 9e92b0d7f9a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeEvent;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeEventCreateCommand(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.getTimeEvent());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeEvent newElement = UMLFactory.eINSTANCE.createTimeEvent();
-
- 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_TimeEvent_2089(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeEvent 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java
deleted file mode 100644
index fcec1bb3586..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeExpression;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeExpressionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeExpressionCreateCommand(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.getTimeExpression());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeExpression newElement = UMLFactory.eINSTANCE.createTimeExpression();
-
- 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_TimeExpression_2102(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeExpression 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java
deleted file mode 100644
index 93c8a48f4b7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeInterval;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeIntervalCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeIntervalCreateCommand(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.getTimeInterval());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeInterval newElement = UMLFactory.eINSTANCE.createTimeInterval();
-
- 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_TimeInterval_2105(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeInterval 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java
deleted file mode 100644
index e62dce4fdb0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class TimeObservationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeObservationCreateCommand(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.getTimeObservation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
-
- 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_TimeObservation_2094(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeObservation 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java
deleted file mode 100644
index 682d3a59270..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * @generated
- */
-public class TimeObservationEventCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public TimeObservationEventCreateCommand(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 TimeObservation) {
- 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
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateTimeObservationEvent_4018(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().setEvent(
- getTarget()
- );
- }
- return CommandResult.newOKCommandResult();
-
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected TimeObservation getSource() {
- return (TimeObservation) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventReorientCommand.java
deleted file mode 100644
index c480680ed97..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventReorientCommand.java
+++ /dev/null
@@ -1,166 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * @generated
- */
-public class TimeObservationEventReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public TimeObservationEventReorientCommand(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 TimeObservation) {
- 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 TimeObservation)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistTimeObservationEvent_4018(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistTimeObservationEvent_4018(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().setEvent(
- null
- );
- getNewSource().setEvent(
- getOldTarget()
- );
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().setEvent(
- getNewTarget()
- );
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected TimeObservation getOldSource() {
- return (TimeObservation) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected TimeObservation getNewSource() {
- return (TimeObservation) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java
deleted file mode 100644
index 7e56f7a594b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java
+++ /dev/null
@@ -1,171 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.Usage;
-
-/**
- * @generated
- */
-public class UsageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public UsageCreateCommand(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().canCreateUsage_4008(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$
- }
-
- Usage newElement = UMLFactory.eINSTANCE.createUsage();
- getContainer().getPackagedElements()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Usage_4008(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Usage 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageReorientCommand.java
deleted file mode 100644
index 74cfc0b67d8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageReorientCommand.java
+++ /dev/null
@@ -1,187 +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.composite.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.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Usage;
-
-/**
- * @generated
- */
-public class UsageReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public UsageReorientCommand(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 Usage) {
- 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().canExistUsage_4008(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().canExistUsage_4008(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 Usage getLink() {
- return (Usage) 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java
deleted file mode 100644
index d700030932c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.UseCase;
-
-/**
- * @generated
- */
-public class UseCaseCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public UseCaseCreateCommand(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.getUseCase());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
-
- 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_UseCase_2082(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(UseCase 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java
deleted file mode 100644
index 265c7762378..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java
+++ /dev/null
@@ -1,127 +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.composite.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.composite.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.UseCase;
-
-/**
- * @generated
- */
-public class UseCaseCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public UseCaseCreateCommandCN(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.getUseCase());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
-
- 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_UseCase_3096(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(UseCase 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AbstractionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AbstractionEditHelper.java
deleted file mode 100644
index 78a13350a5f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AbstractionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class AbstractionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActivityEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActivityEditHelper.java
deleted file mode 100644
index e04a157b3fa..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActivityEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ActivityEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActorEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActorEditHelper.java
deleted file mode 100644
index 66cb3d573e4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ActorEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ActorEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AnyReceiveEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AnyReceiveEventEditHelper.java
deleted file mode 100644
index e75db9762ce..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/AnyReceiveEventEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class AnyReceiveEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ArtifactEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ArtifactEditHelper.java
deleted file mode 100644
index 6b229b2bc54..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ArtifactEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ArtifactEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CallEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CallEventEditHelper.java
deleted file mode 100644
index beef4985dde..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CallEventEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CallEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ChangeEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ChangeEventEditHelper.java
deleted file mode 100644
index 6bfe78826f7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ChangeEventEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ChangeEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ClassEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ClassEditHelper.java
deleted file mode 100644
index ba987b3ad90..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ClassEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ClassEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationEditHelper.java
deleted file mode 100644
index 86428b21f1d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CollaborationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationRoleEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationRoleEditHelper.java
deleted file mode 100644
index 1e6fca4f221..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationRoleEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CollaborationRoleEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationUseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationUseEditHelper.java
deleted file mode 100644
index 01656a5557a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CollaborationUseEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CollaborationUseEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CommentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CommentEditHelper.java
deleted file mode 100644
index 9283a2c8f01..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/CommentEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class CommentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentEditHelper.java
deleted file mode 100644
index ab6879385de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ComponentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentRealizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentRealizationEditHelper.java
deleted file mode 100644
index 8802044b642..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ComponentRealizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ComponentRealizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConnectorEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConnectorEditHelper.java
deleted file mode 100644
index 3a65ce555a7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConnectorEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ConnectorEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConstraintEditHelper.java
deleted file mode 100644
index b175a718166..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DataTypeEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DataTypeEditHelper.java
deleted file mode 100644
index 330c879c68a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DataTypeEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DataTypeEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DependencyEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DependencyEditHelper.java
deleted file mode 100644
index c4ecb65d20c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DependencyEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DependencyEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentEditHelper.java
deleted file mode 100644
index 1e9248a78d8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DeploymentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentSpecificationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentSpecificationEditHelper.java
deleted file mode 100644
index 57b91e698de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeploymentSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DeploymentSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeviceEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeviceEditHelper.java
deleted file mode 100644
index 4ba2dde52e7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DeviceEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DeviceEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationEditHelper.java
deleted file mode 100644
index 4ab4f01d676..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DurationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationIntervalEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationIntervalEditHelper.java
deleted file mode 100644
index a9a3f1ac1df..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationIntervalEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DurationIntervalEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationObservationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationObservationEditHelper.java
deleted file mode 100644
index 00e3f688a93..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/DurationObservationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class DurationObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationEditHelper.java
deleted file mode 100644
index 19c1b80bede..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class EnumerationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationLiteralEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationLiteralEditHelper.java
deleted file mode 100644
index 60643ee8ba2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/EnumerationLiteralEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class EnumerationLiteralEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExecutionEnvironmentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExecutionEnvironmentEditHelper.java
deleted file mode 100644
index 34b8d36404b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExecutionEnvironmentEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExpressionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExpressionEditHelper.java
deleted file mode 100644
index cec2933aa48..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ExpressionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ExpressionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/FunctionBehaviorEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/FunctionBehaviorEditHelper.java
deleted file mode 100644
index 91ae9c98fba..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/FunctionBehaviorEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class FunctionBehaviorEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/GeneralizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/GeneralizationEditHelper.java
deleted file mode 100644
index 07c7e73edbe..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/GeneralizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class GeneralizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationFlowEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationFlowEditHelper.java
deleted file mode 100644
index 08e5a0f1800..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationFlowEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InformationFlowEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationItemEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationItemEditHelper.java
deleted file mode 100644
index 88223d2c0df..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InformationItemEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InformationItemEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InstanceValueEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InstanceValueEditHelper.java
deleted file mode 100644
index 8b55481ff1a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InstanceValueEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InstanceValueEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionConstraintEditHelper.java
deleted file mode 100644
index 497efb2961f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InteractionConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionEditHelper.java
deleted file mode 100644
index 179b9c189b3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InteractionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InteractionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceEditHelper.java
deleted file mode 100644
index 55d6c6596e6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InterfaceEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceRealizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceRealizationEditHelper.java
deleted file mode 100644
index 30cf0d7029c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/InterfaceRealizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class InterfaceRealizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalConstraintEditHelper.java
deleted file mode 100644
index e4930240dc5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class IntervalConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalEditHelper.java
deleted file mode 100644
index a4e15dc16e8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/IntervalEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class IntervalEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralBooleanEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralBooleanEditHelper.java
deleted file mode 100644
index 7d555f941e5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralBooleanEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class LiteralBooleanEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralIntegerEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralIntegerEditHelper.java
deleted file mode 100644
index bbaeaeea541..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralIntegerEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class LiteralIntegerEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralNullEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralNullEditHelper.java
deleted file mode 100644
index 0440a92ffb5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralNullEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class LiteralNullEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralStringEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralStringEditHelper.java
deleted file mode 100644
index 322ac9f2c67..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralStringEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class LiteralStringEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralUnlimitedNaturalEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralUnlimitedNaturalEditHelper.java
deleted file mode 100644
index 11ba67dd843..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/LiteralUnlimitedNaturalEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class LiteralUnlimitedNaturalEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ManifestationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ManifestationEditHelper.java
deleted file mode 100644
index 84e9cdb55fb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ManifestationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ManifestationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/NodeEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/NodeEditHelper.java
deleted file mode 100644
index c8b6e3d1695..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/NodeEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class NodeEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueBehaviorEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueBehaviorEditHelper.java
deleted file mode 100644
index 5aa254ecf6b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueBehaviorEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueExpressionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueExpressionEditHelper.java
deleted file mode 100644
index 4ebcdbf046f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/OpaqueExpressionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class OpaqueExpressionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PackageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PackageEditHelper.java
deleted file mode 100644
index cc25adb2765..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PackageEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PackageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ParameterEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ParameterEditHelper.java
deleted file mode 100644
index d989aefc15e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ParameterEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ParameterEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PortEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PortEditHelper.java
deleted file mode 100644
index 81e03ba9dea..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PortEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PortEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PrimitiveTypeEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PrimitiveTypeEditHelper.java
deleted file mode 100644
index cd86a4b3c96..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PrimitiveTypeEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PrimitiveTypeEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PropertyEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PropertyEditHelper.java
deleted file mode 100644
index 866d84f30c1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/PropertyEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class PropertyEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ProtocolStateMachineEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ProtocolStateMachineEditHelper.java
deleted file mode 100644
index 673a7cd113b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/ProtocolStateMachineEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RealizationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RealizationEditHelper.java
deleted file mode 100644
index 5ba13dc97bc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RealizationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class RealizationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RoleBindingEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RoleBindingEditHelper.java
deleted file mode 100644
index d80caf99d0b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/RoleBindingEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class RoleBindingEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEditHelper.java
deleted file mode 100644
index 2165f553165..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class SignalEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEventEditHelper.java
deleted file mode 100644
index ad38d247472..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SignalEventEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class SignalEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StateMachineEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StateMachineEditHelper.java
deleted file mode 100644
index 70debb10e2e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StateMachineEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class StateMachineEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StringExpressionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StringExpressionEditHelper.java
deleted file mode 100644
index e8798f0900a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/StringExpressionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class StringExpressionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SubstitutionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SubstitutionEditHelper.java
deleted file mode 100644
index 964f45fd0ac..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/SubstitutionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class SubstitutionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeConstraintEditHelper.java
deleted file mode 100644
index fc5cd5a9e68..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class TimeConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeEventEditHelper.java
deleted file mode 100644
index 90f87c7a3b0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeEventEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class TimeEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeExpressionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeExpressionEditHelper.java
deleted file mode 100644
index 9b4d53b6feb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeExpressionEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class TimeExpressionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeIntervalEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeIntervalEditHelper.java
deleted file mode 100644
index 5a41ab82d3a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeIntervalEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class TimeIntervalEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeObservationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeObservationEditHelper.java
deleted file mode 100644
index 9a8b166e5e3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/TimeObservationEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class TimeObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UMLBaseEditHelper.java
index 2e86ffe2c22..3c82d3d91cd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UMLBaseEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UMLBaseEditHelper.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UsageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UsageEditHelper.java
deleted file mode 100644
index 49d0f3d002f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UsageEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class UsageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UseCaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UseCaseEditHelper.java
deleted file mode 100644
index 99c37e43334..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/helpers/UseCaseEditHelper.java
+++ /dev/null
@@ -1,20 +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.composite.edit.helpers;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
-
-/**
- * @generated
- */
-public class UseCaseEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java
index 314618e9f0e..368289877e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionEditPart.java
index 20d891e96ab..42ca1df8646 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy;
-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.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.AbstractionItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AbstractionItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeAbstractionLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeAbstractionLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AbstractionNameEditPart) {
- ((AbstractionNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof AbstractionNameEditPart) {
+ ((AbstractionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof AbstractionAppliedStereotypeEditPart) {
- ((AbstractionAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof AbstractionAppliedStereotypeEditPart) {
+ ((AbstractionAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AbstractionNameEditPart) {
+ if(childEditPart instanceof AbstractionNameEditPart) {
return true;
}
- if (childEditPart instanceof AbstractionAppliedStereotypeEditPart) {
+ if(childEditPart instanceof AbstractionAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
/**
* 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();
}
@@ -115,8 +109,7 @@ public class AbstractionEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
+ return (DashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java
index ea2e4760660..0fa09699379 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java
index b5e13523e32..988b45970a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActivityCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ActivityCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7063;
-
- /**
- * @generated
- */
- public ActivityCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ActivityCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ActivityCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7063;
+
+ /**
+ * @generated
+ */
+ public ActivityCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ActivityCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java
index e38081494d4..077dc9c11fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActivityCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ActivityCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7050;
-
- /**
- * @generated
- */
- public ActivityCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ActivityCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ActivityCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7050;
+
+ /**
+ * @generated
+ */
+ public ActivityCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ActivityCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java
index 4afa7a0c9f9..c68c3bf46c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActivityCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ActivityCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ActivityCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure
- *
* @generated
*/
- @Override
public ActivityCompositeFigure getPrimaryShape() {
- return (ActivityCompositeFigure) primaryShape;
+ return (ActivityCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityCompositeNameEditPart) {
- ((ActivityCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ActivityCompositeNameEditPart) {
+ ((ActivityCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ActivityCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ActivityCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityCompositeNameEditPart) {
+ if(childEditPart instanceof ActivityCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof ActivityCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ActivityCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ActivityCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((ActivityCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ActivityCompositeCompartmentEditPart) {
+ if(editPart instanceof ActivityCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ActivityCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ActivityCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class ActivityCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java
index a6559d9f790..ae4e60eb6d2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActivityCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ActivityCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ActivityCompositeFigure
- *
* @generated
*/
- @Override
public ActivityCompositeFigure getPrimaryShape() {
- return (ActivityCompositeFigure) primaryShape;
+ return (ActivityCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityCompositeNameEditPartCN) {
- ((ActivityCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ActivityCompositeNameEditPartCN) {
+ ((ActivityCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ActivityCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ActivityCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityCompositeNameEditPartCN) {
+ if(childEditPart instanceof ActivityCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ActivityCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ActivityCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ActivityCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((ActivityCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ActivityCompositeCompartmentEditPartCN) {
+ if(editPart instanceof ActivityCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ActivityCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ActivityCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class ActivityCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPart.java
index e4cd2e78044..22076b20d06 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Activity_2060, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActivityCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ActivityCompositeFloatingLabelEditPart extends FloatingLabelEditPar
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPartCN.java
index f44da5f3778..2a2b6e3b287 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Activity_3072, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ActivityCompositeFloatingLabelEditPartCN extends FloatingLabelEditP
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java
index 1ee60ee95bc..baadee471b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Activity_2060, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActivityCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java
index dd942996947..e61f22cba06 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Activity_3072, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActivityCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java
index 42ae9548ad5..fdf978b8ea0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -42,8 +44,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActorItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,14 +77,13 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActorItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -98,22 +97,21 @@ public class ActorEditPart extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ActorFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -135,31 +133,26 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActorNameEditPart) {
- ((ActorNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ActorNameEditPart) {
+ ((ActorNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -167,7 +160,7 @@ public class ActorEditPart extends NodeEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActorNameEditPart) {
+ if(childEditPart instanceof ActorNameEditPart) {
return true;
}
return false;
@@ -176,9 +169,8 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -187,9 +179,8 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -198,9 +189,8 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -209,21 +199,15 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ActorFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ActorFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -231,29 +215,24 @@ public class ActorEditPart extends NodeEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -264,9 +243,8 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -275,9 +253,8 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -285,7 +262,6 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -293,17 +269,15 @@ public class ActorEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActorNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java
index 7d1f5c3a79c..8cb8730b00e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -42,8 +44,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ActorItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,14 +77,13 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActorItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -98,22 +97,21 @@ public class ActorEditPartCN extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ActorFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -135,31 +133,26 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActorNameEditPartCN) {
- ((ActorNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ActorNameEditPartCN) {
+ ((ActorNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -167,7 +160,7 @@ public class ActorEditPartCN extends NodeEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActorNameEditPartCN) {
+ if(childEditPart instanceof ActorNameEditPartCN) {
return true;
}
return false;
@@ -176,9 +169,8 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -187,9 +179,8 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -198,9 +189,8 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -209,21 +199,15 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ActorFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ActorFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -231,29 +215,24 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -264,9 +243,8 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -275,9 +253,8 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -285,7 +262,6 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -293,17 +269,15 @@ public class ActorEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActorNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPart.java
index f48315b4107..f25610f115a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ActorFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Actor_2077, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActorFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ActorFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPartCN.java
index e418c8c6ce8..54d7328a01b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Actor_3091, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActorFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ActorFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java
index 3709db6bd9d..944687f095a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Actor_2077, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActorNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java
index 8cbcce3439e..7e9be3435d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Actor_3091, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ActorNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java
index c2c5febfe63..87a66a659d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.AnyReceiveEventItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AnyReceiveEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case AnyReceiveEventFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AnyReceiveEventNameEditPart) {
- ((AnyReceiveEventNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof AnyReceiveEventNameEditPart) {
+ ((AnyReceiveEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AnyReceiveEventNameEditPart) {
+ if(childEditPart instanceof AnyReceiveEventNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof AnyReceiveEventFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof AnyReceiveEventFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class AnyReceiveEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(AnyReceiveEventNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventFloatingLabelEditPart.java
index 6085d59ef36..03742612589 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.AnyReceiveEvent_2085, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.AnyReceiveEventFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class AnyReceiveEventFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java
index 2e18338d8ac..ba96c17fffb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.AnyReceiveEvent_2085, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.AnyReceiveEventNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java
index 9189f903456..404a439ada2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -42,8 +44,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ArtifactItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,14 +77,13 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -98,22 +97,21 @@ public class ArtifactEditPart extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ 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());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -135,31 +133,26 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPart) {
- ((ArtifactNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ArtifactNameEditPart) {
+ ((ArtifactNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -167,7 +160,7 @@ public class ArtifactEditPart extends NodeEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPart) {
+ if(childEditPart instanceof ArtifactNameEditPart) {
return true;
}
return false;
@@ -176,9 +169,8 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -187,9 +179,8 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -198,9 +189,8 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -209,21 +199,15 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ArtifactFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ArtifactFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -231,29 +215,24 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -264,9 +243,8 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -275,9 +253,8 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -285,7 +262,6 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -293,17 +269,15 @@ public class ArtifactEditPart extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java
index 994c7d2c512..c25b4f51cb4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -42,8 +44,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ArtifactItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,14 +77,13 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -98,22 +97,21 @@ public class ArtifactEditPartCN extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ 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());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -135,31 +133,26 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartCN) {
- ((ArtifactNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ArtifactNameEditPartCN) {
+ ((ArtifactNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -167,7 +160,7 @@ public class ArtifactEditPartCN extends NodeEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartCN) {
+ if(childEditPart instanceof ArtifactNameEditPartCN) {
return true;
}
return false;
@@ -176,9 +169,8 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -187,9 +179,8 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -198,9 +189,8 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -209,21 +199,15 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ArtifactFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ArtifactFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -231,29 +215,24 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -264,9 +243,8 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -275,9 +253,8 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -285,7 +262,6 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -293,17 +269,15 @@ public class ArtifactEditPartCN extends NodeEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPart.java
index 477db2c8da1..a3878f3eb1f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_2079, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ArtifactFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ArtifactFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPartCN.java
index d36294e2dab..ce3d6a4061e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_3093, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ArtifactFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java
index 3fc78bb7c72..b54edeb3068 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_2079, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ArtifactNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java
index fd7adc4f495..71cccffc027 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_3093, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ArtifactNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java
index 8c97c20a028..8945223aa4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,7 @@ 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.DefaultGraphicalNodeEditPolicy;
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;
@@ -75,10 +76,10 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
removeEditPolicy(EditPolicyRoles.SEMANTIC_ROLE);
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(BehaviorSymbolEditPolicy.BEHAVIOR_SYMBOL, new BehaviorSymbolEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new NoConnectableEditPolicy());
@@ -95,22 +96,21 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case BehaviorPortFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -130,65 +130,53 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof BehaviorPortFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof BehaviorPortFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -196,27 +184,22 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
}
@@ -224,9 +207,8 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -235,9 +217,8 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -245,7 +226,6 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -253,17 +233,15 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(BehaviorPortFloatingLabelEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortFloatingLabelEditPart.java
index bd3a201c406..7fc63f8211b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,10 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class BehaviorPortFloatingLabelEditPart extends
- FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class BehaviorPortFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -116,19 +113,15 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -146,7 +139,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -157,12 +149,11 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -170,26 +161,24 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -197,12 +186,12 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -210,12 +199,12 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -223,20 +212,19 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -247,7 +235,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -255,7 +242,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -287,12 +273,10 @@ public class BehaviorPortFloatingLabelEditPart extends
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -301,30 +285,26 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -337,31 +317,27 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -371,9 +347,8 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -382,7 +357,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -390,9 +364,8 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Node_3121, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.BehaviorPortFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -402,10 +375,8 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -434,8 +405,8 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -443,8 +414,8 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -453,56 +424,47 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -524,15 +486,14 @@ public class BehaviorPortFloatingLabelEditPart extends
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -546,7 +507,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -561,27 +521,26 @@ public class BehaviorPortFloatingLabelEditPart extends
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -589,18 +548,15 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -609,27 +565,19 @@ public class BehaviorPortFloatingLabelEditPart extends
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -637,7 +585,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -645,13 +592,12 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -661,10 +607,9 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -675,9 +620,8 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -698,31 +642,30 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -730,7 +673,7 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -740,13 +683,12 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -756,25 +698,20 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -784,13 +721,12 @@ public class BehaviorPortFloatingLabelEditPart extends
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -803,35 +739,29 @@ public class BehaviorPortFloatingLabelEditPart extends
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -844,7 +774,6 @@ public class BehaviorPortFloatingLabelEditPart extends
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -857,5 +786,4 @@ public class BehaviorPortFloatingLabelEditPart extends
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortLinkEditPart.java
index f1a2b7ba610..d84d1ba272a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortLinkEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -42,7 +42,6 @@ public class BehaviorPortLinkEditPart extends ConnectionEditPart implements ITre
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ViewComponentEditPolicy());
@@ -53,13 +52,12 @@ public class BehaviorPortLinkEditPart extends ConnectionEditPart implements ITre
/**
* 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 PolylineConnectionEx();
}
@@ -67,8 +65,7 @@ public class BehaviorPortLinkEditPart extends ConnectionEditPart implements ITre
/**
* @generated
*/
- @Override
public PolylineConnectionEx getPrimaryShape() {
- return (PolylineConnectionEx) getFigure();
+ return (PolylineConnectionEx)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java
index a02cb1e3df7..840a1237eb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CallEventItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case CallEventFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallEventNameEditPart) {
- ((CallEventNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof CallEventNameEditPart) {
+ ((CallEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallEventNameEditPart) {
+ if(childEditPart instanceof CallEventNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CallEventFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof CallEventFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class CallEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallEventNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventFloatingLabelEditPart.java
index 72381108684..ff3d6ce52a6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.CallEvent_2084, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CallEventFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class CallEventFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java
index 2051a2502ff..99cb6b6d694 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.CallEvent_2084, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CallEventNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java
index 2501590c124..79d8872f5cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ChangeEventItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ChangeEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ChangeEventFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ChangeEventNameEditPart) {
- ((ChangeEventNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ChangeEventNameEditPart) {
+ ((ChangeEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ChangeEventNameEditPart) {
+ if(childEditPart instanceof ChangeEventNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ChangeEventFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ChangeEventFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class ChangeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ChangeEventNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventFloatingLabelEditPart.java
index 844926f4cd2..13d4cc36334 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ChangeEvent_2088, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ChangeEventFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ChangeEventFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java
index d3754f415c8..850552f72b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ChangeEvent_2088, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ChangeEventNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java
index b5585d31bf8..ca17558ce14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ClassCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ClassCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7073;
-
- /**
- * @generated
- */
- public ClassCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ClassCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7073;
+
+ /**
+ * @generated
+ */
+ public ClassCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java
index 2be16f527b2..8b6d862177d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ClassCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ClassCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7060;
-
- /**
- * @generated
- */
- public ClassCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ClassCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7060;
+
+ /**
+ * @generated
+ */
+ public ClassCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java
index 0c75a5e5b47..656e97ba852 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ClassCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ClassCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ClassCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure
- *
* @generated
*/
- @Override
public ClassCompositeFigure getPrimaryShape() {
- return (ClassCompositeFigure) primaryShape;
+ return (ClassCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ClassCompositeNameEditPart) {
- ((ClassCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ClassCompositeNameEditPart) {
+ ((ClassCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ClassCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ClassCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ClassCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ClassCompositeNameEditPart) {
+ if(childEditPart instanceof ClassCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof ClassCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ClassCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ClassCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((ClassCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ClassCompositeCompartmentEditPart) {
+ if(editPart instanceof ClassCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ClassCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ClassCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class ClassCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java
index f3fda4b3a78..b886905e937 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ClassCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ClassCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ClassCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ClassCompositeFigure
- *
* @generated
*/
- @Override
public ClassCompositeFigure getPrimaryShape() {
- return (ClassCompositeFigure) primaryShape;
+ return (ClassCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ClassCompositeNameEditPartCN) {
- ((ClassCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ClassCompositeNameEditPartCN) {
+ ((ClassCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ClassCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ClassCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ClassCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ClassCompositeNameEditPartCN) {
+ if(childEditPart instanceof ClassCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ClassCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ClassCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ClassCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((ClassCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ClassCompositeCompartmentEditPartCN) {
+ if(editPart instanceof ClassCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ClassCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ClassCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class ClassCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPart.java
index 167de32b53d..5a393e0e450 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Class_2073, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ClassCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPartCN.java
index 0b2c7535aaa..c139b4ffa25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Class_3085, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ClassCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java
index bda42c7f20a..3417204858a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Class_2073, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java
index 7ac79c04068..c505e499c38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Class_3085, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java
index 01a1065be28..fabce9c38d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomCollaborationCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7075;
-
- /**
- * @generated
- */
- public CollaborationCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.CollaborationCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCollaborationCompositeCompartmentItemSemanticEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class CollaborationCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7075;
+
+ /**
+ * @generated
+ */
+ public CollaborationCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.CollaborationCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java
index aaf8de737af..a423e64ab49 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomCollaborationCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7061;
-
- /**
- * @generated
- */
- public CollaborationCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.CollaborationCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCollaborationCompositeCompartmentItemSemanticEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class CollaborationCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7061;
+
+ /**
+ * @generated
+ */
+ public CollaborationCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.CollaborationCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java
index b0934f52b86..70d560216bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -48,7 +50,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -82,10 +83,10 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -105,22 +106,21 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case CollaborationCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -140,64 +140,55 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 CollaborationCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure
- *
* @generated
*/
- @Override
public CollaborationCompositeFigure getPrimaryShape() {
- return (CollaborationCompositeFigure) primaryShape;
+ return (CollaborationCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationCompositeNameEditPart) {
- ((CollaborationCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof CollaborationCompositeNameEditPart) {
+ ((CollaborationCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof CollaborationCompositeCompartmentEditPart) {
+ if(childEditPart instanceof CollaborationCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((CollaborationCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((CollaborationCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -205,12 +196,12 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationCompositeNameEditPart) {
+ if(childEditPart instanceof CollaborationCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof CollaborationCompositeCompartmentEditPart) {
+ if(childEditPart instanceof CollaborationCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((CollaborationCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((CollaborationCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -219,9 +210,8 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -230,9 +220,8 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -241,12 +230,11 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof CollaborationCompositeCompartmentEditPart) {
+ if(editPart instanceof CollaborationCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -255,21 +243,15 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CollaborationCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof CollaborationCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -277,29 +259,24 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -310,9 +287,8 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -321,9 +297,8 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -331,7 +306,6 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -339,17 +313,15 @@ public class CollaborationCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java
index d0b54685684..00d12c1a205 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -48,7 +50,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -82,10 +83,10 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -105,22 +106,21 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -140,64 +140,55 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 CollaborationCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationCompositeFigure
- *
* @generated
*/
- @Override
public CollaborationCompositeFigure getPrimaryShape() {
- return (CollaborationCompositeFigure) primaryShape;
+ return (CollaborationCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationCompositeNameEditPartCN) {
- ((CollaborationCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof CollaborationCompositeNameEditPartCN) {
+ ((CollaborationCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof CollaborationCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof CollaborationCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((CollaborationCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((CollaborationCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -205,12 +196,12 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationCompositeNameEditPartCN) {
+ if(childEditPart instanceof CollaborationCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof CollaborationCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof CollaborationCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((CollaborationCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((CollaborationCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
return false;
@@ -219,9 +210,8 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -230,9 +220,8 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -241,12 +230,11 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof CollaborationCompositeCompartmentEditPartCN) {
+ if(editPart instanceof CollaborationCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -255,21 +243,15 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CollaborationCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof CollaborationCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -277,29 +259,24 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -310,9 +287,8 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -321,9 +297,8 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -331,7 +306,6 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -339,17 +313,15 @@ public class CollaborationCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPart.java
index 405d16c7ea3..3aa6055f464 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Collaboration_2075, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class CollaborationCompositeFloatingLabelEditPart extends FloatingLabelEd
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPartCN.java
index 88ffbfee5c3..5877fbb29fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Collaboration_3086, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class CollaborationCompositeFloatingLabelEditPartCN extends FloatingLabel
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java
index 30fdd5fcd98..3e651143555 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Collaboration_2075, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java
index ad25065c808..53d99354fb6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Collaboration_3086, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java
index 98b10297c75..898e0ab7bc3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,9 +47,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CollaborationRoleItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationRoleFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationRoleItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,13 +81,12 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationRoleItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationRoleItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
@@ -103,22 +102,21 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +136,49 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 CollaborationRoleFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationRoleFigure
- *
* @generated
*/
- @Override
public CollaborationRoleFigure getPrimaryShape() {
- return (CollaborationRoleFigure) primaryShape;
+ return (CollaborationRoleFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationRoleNameEditPartCN) {
- ((CollaborationRoleNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof CollaborationRoleNameEditPartCN) {
+ ((CollaborationRoleNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +186,7 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationRoleNameEditPartCN) {
+ if(childEditPart instanceof CollaborationRoleNameEditPartCN) {
return true;
}
return false;
@@ -205,9 +195,8 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +205,8 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +215,8 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +225,15 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CollaborationRoleFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof CollaborationRoleFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +241,24 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +269,8 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +279,8 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +288,6 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +295,15 @@ public class CollaborationRoleEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CollaborationRoleNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleFloatingLabelEditPartCN.java
index 81bb8e9ec77..c8c298c4915 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ConnectableElement_3115, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class CollaborationRoleFloatingLabelEditPartCN extends FloatingLabelEditP
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java
index 00c1b71beeb..68370b3b871 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ConnectableElement_3115, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationRoleNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,7 +624,7 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -684,12 +635,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -697,7 +648,7 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -707,13 +658,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -723,25 +673,20 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -751,13 +696,12 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -773,7 +717,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -782,7 +725,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -791,39 +733,34 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -832,7 +769,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -846,7 +782,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -856,18 +791,15 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -875,6 +807,5 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java
index b545cc2cfae..ffc531954c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,9 +47,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomCollaborationUseItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CollaborationUseItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,12 +81,11 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CollaborationUseItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCollaborationUseItemSemanticEditPolicyCN());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -103,22 +102,21 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case CollaborationUseFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +136,49 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.composite.custom.figures.CollaborationUseFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationUseNameEditPart) {
- ((CollaborationUseNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof CollaborationUseNameEditPart) {
+ ((CollaborationUseNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +186,7 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CollaborationUseNameEditPart) {
+ if(childEditPart instanceof CollaborationUseNameEditPart) {
return true;
}
return false;
@@ -205,9 +195,8 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +205,8 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +215,8 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +225,15 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CollaborationUseFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof CollaborationUseFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +241,24 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +269,8 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +279,8 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +288,6 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +295,15 @@ public class CollaborationUseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CollaborationUseNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseFloatingLabelEditPartCN.java
index c7b25d59da8..ca6dc0cedf1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.CollaborationUse_3071, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationUseFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class CollaborationUseFloatingLabelEditPartCN extends FloatingLabelEditPa
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java
index f4a23e201ea..ec40170e16e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -137,7 +135,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -150,12 +147,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -163,12 +160,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -176,12 +173,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -189,20 +186,19 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -213,7 +209,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -221,7 +216,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -229,7 +223,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -246,12 +239,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -264,12 +257,10 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -278,30 +269,26 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -314,31 +301,27 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -348,9 +331,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -359,7 +341,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -367,9 +348,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.CollaborationUse_3071, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CollaborationUseNameEditPart.VISUAL_ID));
}
return parser;
@@ -379,10 +359,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -411,8 +389,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -420,8 +398,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -430,56 +408,47 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -501,15 +470,14 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -523,7 +491,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -538,27 +505,26 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -566,18 +532,15 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -586,27 +549,19 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -614,7 +569,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -622,13 +576,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -638,10 +591,9 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -652,9 +604,8 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -675,31 +626,30 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -707,7 +657,7 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -717,13 +667,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -733,25 +682,20 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -761,13 +705,12 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -783,7 +726,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -792,7 +734,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -801,39 +742,34 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -842,7 +778,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -856,7 +791,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -866,18 +800,15 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -885,6 +816,5 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentAnnotatedElementEditPart.java
index d1e7de00270..e303ae9d5fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentAnnotatedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentAnnotatedElementEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,8 +16,8 @@ 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.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
/**
* @generated
@@ -39,21 +39,19 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentAnnotatedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
}
/**
* 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 SimpleDashedEdgeFigure();
}
@@ -61,8 +59,7 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen
/**
* @generated
*/
- @Override
public SimpleDashedEdgeFigure getPrimaryShape() {
- return (SimpleDashedEdgeFigure) getFigure();
+ return (SimpleDashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java
index 617f4fc5861..daca4ac9b7f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Comment_2109, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentBodyEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java
index 050cbfe9050..009560d2a76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Comment_3097, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentBodyEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java
index 55c99314009..146d28169a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -33,7 +35,6 @@ 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.composite.edit.policies.CommentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -67,10 +68,10 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
@@ -87,7 +88,7 @@ public class CommentEditPart extends AbstractCommentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -107,44 +108,36 @@ public class CommentEditPart extends AbstractCommentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (HTMLCornerBentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPart) {
- ((CommentBodyEditPart) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
+ if(childEditPart instanceof CommentBodyEditPart) {
+ ((CommentBodyEditPart)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -152,7 +145,7 @@ public class CommentEditPart extends AbstractCommentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPart) {
+ if(childEditPart instanceof CommentBodyEditPart) {
return true;
}
return false;
@@ -161,9 +154,8 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -172,9 +164,8 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -183,15 +174,10 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -199,29 +185,24 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -232,9 +213,8 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -243,9 +223,8 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -253,7 +232,6 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -261,17 +239,15 @@ public class CommentEditPart extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java
index 93db8edea89..82db32ee7aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -33,7 +35,6 @@ 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.composite.edit.policies.CommentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -67,10 +68,10 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
@@ -87,7 +88,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -107,44 +108,36 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (HTMLCornerBentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPartCN) {
- ((CommentBodyEditPartCN) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
+ if(childEditPart instanceof CommentBodyEditPartCN) {
+ ((CommentBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -152,7 +145,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPartCN) {
+ if(childEditPart instanceof CommentBodyEditPartCN) {
return true;
}
return false;
@@ -161,9 +154,8 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -172,9 +164,8 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -183,15 +174,10 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -199,29 +185,24 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -232,9 +213,8 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -243,9 +223,8 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -253,7 +232,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -261,17 +239,15 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java
index 6c92d1698bd..6b599675488 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ComponentCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7069;
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ComponentCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ComponentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7069;
+
+ /**
+ * @generated
+ */
+ public ComponentCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ComponentCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java
index a16dfbdeb38..d74de702aeb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ComponentCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7056;
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ComponentCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ComponentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7056;
+
+ /**
+ * @generated
+ */
+ public ComponentCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ComponentCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java
index 05ef6748b0f..b6645b03f6e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ComponentCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ComponentCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ComponentCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure
- *
* @generated
*/
- @Override
public ComponentCompositeFigure getPrimaryShape() {
- return (ComponentCompositeFigure) primaryShape;
+ return (ComponentCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentCompositeNameEditPart) {
- ((ComponentCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ComponentCompositeNameEditPart) {
+ ((ComponentCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ComponentCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ComponentCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ComponentCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ComponentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentCompositeNameEditPart) {
+ if(childEditPart instanceof ComponentCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof ComponentCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ComponentCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ComponentCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((ComponentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ComponentCompositeCompartmentEditPart) {
+ if(editPart instanceof ComponentCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ComponentCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ComponentCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class ComponentCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ComponentCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java
index 04bc91c8e70..d2e901d7588 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ComponentCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ComponentCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ComponentCompositeFigure
- *
* @generated
*/
- @Override
public ComponentCompositeFigure getPrimaryShape() {
- return (ComponentCompositeFigure) primaryShape;
+ return (ComponentCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentCompositeNameEditPartCN) {
- ((ComponentCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ComponentCompositeNameEditPartCN) {
+ ((ComponentCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ComponentCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ComponentCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ComponentCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ComponentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentCompositeNameEditPartCN) {
+ if(childEditPart instanceof ComponentCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ComponentCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ComponentCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ComponentCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((ComponentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ComponentCompositeCompartmentEditPartCN) {
+ if(editPart instanceof ComponentCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ComponentCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ComponentCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class ComponentCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ComponentCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPart.java
index 573b72c41f1..07de68922e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Component_2069, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ComponentCompositeFloatingLabelEditPart extends FloatingLabelEditPa
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPartCN.java
index 19e0c4ec51e..b6964bd3c1e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Component_3081, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ComponentCompositeFloatingLabelEditPartCN extends FloatingLabelEdit
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java
index 5b6fff0423d..d4f38c620e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Component_2069, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java
index b2312f2e3dd..919fbd9c72a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Component_3081, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
index b4518782bde..4e5c68951d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationEditPart.java
index 396e574cfc9..214b353d10b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.figure.edge.InterfaceRealizationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ComponentRealizationItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +41,21 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentRealizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentRealizationNameEditPart) {
- ((ComponentRealizationNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ComponentRealizationNameEditPart) {
+ ((ComponentRealizationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof ComponentRealizationAppliedStereotypeEditPart) {
- ((ComponentRealizationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof ComponentRealizationAppliedStereotypeEditPart) {
+ ((ComponentRealizationAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +63,8 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +74,10 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ComponentRealizationNameEditPart) {
+ if(childEditPart instanceof ComponentRealizationNameEditPart) {
return true;
}
- if (childEditPart instanceof ComponentRealizationAppliedStereotypeEditPart) {
+ if(childEditPart instanceof ComponentRealizationAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +86,8 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +95,12 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* 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 InterfaceRealizationFigure();
}
@@ -115,8 +108,7 @@ public class ComponentRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
public InterfaceRealizationFigure getPrimaryShape() {
- return (InterfaceRealizationFigure) getFigure();
+ return (InterfaceRealizationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java
index a3048c9bafc..576c63cda1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java
index 2f7c785bd7b..2cadc7118aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java
@@ -1,60 +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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CompositeStructureDiagramItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class CompositeStructureDiagramEditPart extends PapyrusDiagramEditPart {
-
- /**
- * @generated
- */
- public final static String MODEL_ID = "CompositeStructure"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1000;
-
- /**
- * @generated
- */
- public CompositeStructureDiagramEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
-
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
-
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CompositeStructureDiagramItemSemanticEditPolicy());
- 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.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+
+/**
+ * @generated
+ */
+public class CompositeStructureDiagramEditPart extends PapyrusDiagramEditPart {
+
+ /**
+ * @generated
+ */
+ public final static String MODEL_ID = "CompositeStructure"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1000;
+
+ /**
+ * @generated
+ */
+ public CompositeStructureDiagramEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java
index 476e300e169..0ff6fc8d143 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorEditPart.java
index e8061858d70..ede2e7d64f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.composite.custom.figures.ConnectorFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ConnectorItemSemanticEditPolicy;
/**
* @generated
@@ -42,32 +41,27 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConnectorItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConnectorAppliedStereotypeEditPart) {
- ((ConnectorAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof ConnectorAppliedStereotypeEditPart) {
+ ((ConnectorAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
- if (childEditPart instanceof ConnectorNameEditPart) {
- ((ConnectorNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ConnectorNameEditPart) {
+ ((ConnectorNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof ConnectorMultiplicitySourceEditPart) {
- ((ConnectorMultiplicitySourceEditPart) childEditPart).setLabel(
- getPrimaryShape().getMultiplicitySourceLabel());
+ if(childEditPart instanceof ConnectorMultiplicitySourceEditPart) {
+ ((ConnectorMultiplicitySourceEditPart)childEditPart).setLabel(getPrimaryShape().getMultiplicitySourceLabel());
}
- if (childEditPart instanceof ConnectorMultiplicityTargetEditPart) {
- ((ConnectorMultiplicityTargetEditPart) childEditPart).setLabel(
- getPrimaryShape().getMultiplicityTargetLabel());
+ if(childEditPart instanceof ConnectorMultiplicityTargetEditPart) {
+ ((ConnectorMultiplicityTargetEditPart)childEditPart).setLabel(getPrimaryShape().getMultiplicityTargetLabel());
}
return false;
}
@@ -75,9 +69,8 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -87,16 +80,16 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConnectorAppliedStereotypeEditPart) {
+ if(childEditPart instanceof ConnectorAppliedStereotypeEditPart) {
return true;
}
- if (childEditPart instanceof ConnectorNameEditPart) {
+ if(childEditPart instanceof ConnectorNameEditPart) {
return true;
}
- if (childEditPart instanceof ConnectorMultiplicitySourceEditPart) {
+ if(childEditPart instanceof ConnectorMultiplicitySourceEditPart) {
return true;
}
- if (childEditPart instanceof ConnectorMultiplicityTargetEditPart) {
+ if(childEditPart instanceof ConnectorMultiplicityTargetEditPart) {
return true;
}
return false;
@@ -105,9 +98,8 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -115,13 +107,12 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
/**
* 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 ConnectorFigure();
}
@@ -129,8 +120,7 @@ public class ConnectorEditPart extends UMLConnectionNodeEditPart implements ITre
/**
* @generated
*/
- @Override
public ConnectorFigure getPrimaryShape() {
- return (ConnectorFigure) getFigure();
+ return (ConnectorFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java
index 1b6808c2db6..c234f5b79e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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.SOURCE;
}
@@ -161,12 +156,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorMultiplicitySourceEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java
index fe11bc39394..2f8e990a1e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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.TARGET;
}
@@ -161,12 +156,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorMultiplicityTargetEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java
index 27497eaf4a0..68bf9fc3760 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -44,7 +44,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -116,14 +115,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -142,21 +139,19 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -165,12 +160,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -178,12 +173,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -191,12 +186,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -204,20 +199,19 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -228,7 +222,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -236,7 +229,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -244,7 +236,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -261,12 +252,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -279,12 +270,10 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -293,30 +282,26 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -329,31 +314,27 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -363,9 +344,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -374,7 +354,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -382,9 +361,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConnectorNameEditPart.VISUAL_ID));
}
return parser;
@@ -394,10 +372,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -426,8 +402,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -435,8 +411,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -445,56 +421,47 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -516,15 +483,14 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -538,7 +504,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -553,20 +518,20 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -574,18 +539,15 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -594,27 +556,19 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -622,7 +576,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -630,13 +583,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -646,10 +598,9 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -660,9 +611,8 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -683,31 +633,30 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -715,7 +664,7 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -725,13 +674,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -741,25 +689,20 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -769,13 +712,12 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -791,39 +733,33 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
-
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -832,7 +768,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText
/**
* @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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintConstrainedElementEditPart.java
index f5020569a5f..5422ad520d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintConstrainedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintConstrainedElementEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -15,9 +15,9 @@ import org.eclipse.draw2d.Connection;
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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
/**
* @generated
@@ -39,21 +39,19 @@ public class ConstraintConstrainedElementEditPart extends UMLConnectionNodeEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintConstrainedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
}
/**
* 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 SimpleDashedEdgeFigure();
}
@@ -61,8 +59,7 @@ public class ConstraintConstrainedElementEditPart extends UMLConnectionNodeEditP
/**
* @generated
*/
- @Override
public SimpleDashedEdgeFigure getPrimaryShape() {
- return (SimpleDashedEdgeFigure) getFigure();
+ return (SimpleDashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java
index 7dc64a55195..42849ee9134 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.ConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPart) {
- ((ConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ConstraintNameEditPart) {
+ ((ConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof ConstraintSpecificationEditPart) {
- ((ConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof ConstraintSpecificationEditPart) {
+ ((ConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPart) {
+ if(childEditPart instanceof ConstraintNameEditPart) {
return true;
}
- if (childEditPart instanceof ConstraintSpecificationEditPart) {
+ if(childEditPart instanceof ConstraintSpecificationEditPart) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java
index 1ef2a70ad14..7a4b560e55f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.ConstraintItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPartCN) {
- ((ConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ConstraintNameEditPartCN) {
+ ((ConstraintNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
- ((ConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof ConstraintSpecificationEditPartCN) {
+ ((ConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPartCN) {
+ if(childEditPart instanceof ConstraintNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
+ if(childEditPart instanceof ConstraintSpecificationEditPartCN) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java
index 696976cf17d..319732df94e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2114, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java
index 74e171e4519..480cad48a9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_3120, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java
index 5e393540b53..91ff0c6046a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2114, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java
index 4d54d199555..88bb26ca9de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_3120, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java
index 0bf9568f58a..b006ba04b26 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DataTypeAttributeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DataTypeAttributeCompartmentEditPart extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7033;
-
- /**
- * @generated
- */
- public DataTypeAttributeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DataTypeAttributeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeAttributeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DataTypeAttributeCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7033;
+
+ /**
+ * @generated
+ */
+ public DataTypeAttributeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DataTypeAttributeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
index c244544dff6..66ce054330c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DataTypeAttributeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DataTypeAttributeCompartmentEditPartCN extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7036;
-
- /**
- * @generated
- */
- public DataTypeAttributeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DataTypeAttributeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeAttributeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DataTypeAttributeCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7036;
+
+ /**
+ * @generated
+ */
+ public DataTypeAttributeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DataTypeAttributeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java
index 417c4f7ca5a..9e454f9529c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -38,6 +38,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,13 +48,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNo
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;
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.composite.edit.policies.DataTypeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
import org.eclipse.swt.graphics.Color;
@@ -86,11 +87,11 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -109,22 +110,21 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DataTypeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -144,71 +144,61 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 DataTypeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure
- *
* @generated
*/
- @Override
public DataTypeFigure getPrimaryShape() {
- return (DataTypeFigure) primaryShape;
+ return (DataTypeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataTypeNameEditPart) {
- ((DataTypeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DataTypeNameEditPart) {
+ ((DataTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
+ if(childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DataTypeAttributeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DataTypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
- if (childEditPart instanceof DataTypeOperationCompartmentEditPart) {
+ if(childEditPart instanceof DataTypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DataTypeOperationCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DataTypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -216,17 +206,17 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataTypeNameEditPart) {
+ if(childEditPart instanceof DataTypeNameEditPart) {
return true;
}
- if (childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
+ if(childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
- pane.remove(((DataTypeAttributeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((DataTypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof DataTypeOperationCompartmentEditPart) {
+ if(childEditPart instanceof DataTypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
- pane.remove(((DataTypeOperationCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((DataTypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -235,9 +225,8 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -246,9 +235,8 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -257,15 +245,14 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DataTypeAttributeCompartmentEditPart) {
+ if(editPart instanceof DataTypeAttributeCompartmentEditPart) {
return getPrimaryShape().getAttributeCompartmentFigure();
}
- if (editPart instanceof DataTypeOperationCompartmentEditPart) {
+ if(editPart instanceof DataTypeOperationCompartmentEditPart) {
return getPrimaryShape().getOperationCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -274,21 +261,15 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DataTypeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof DataTypeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -296,29 +277,24 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -329,9 +305,8 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -340,9 +315,8 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -350,7 +324,6 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -358,17 +331,15 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
}
@@ -376,15 +347,14 @@ public class DataTypeEditPart extends RoundedCompartmentEditPart {
/**
* @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.Property_3101) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.Property_3101)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID));
}
- if (type == UMLElementTypes.Operation_3102) {
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.Operation_3102)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeOperationCompartmentEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java
index 61ee23b44a0..0fca72d2ab5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -38,6 +38,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,13 +48,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNo
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;
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.composite.edit.policies.DataTypeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
import org.eclipse.swt.graphics.Color;
@@ -86,11 +87,11 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -109,22 +110,21 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DataTypeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -144,71 +144,61 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 DataTypeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure
- *
* @generated
*/
- @Override
public DataTypeFigure getPrimaryShape() {
- return (DataTypeFigure) primaryShape;
+ return (DataTypeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataTypeNameEditPartCN) {
- ((DataTypeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DataTypeNameEditPartCN) {
+ ((DataTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
+ if(childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DataTypeAttributeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DataTypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
- if (childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
+ if(childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DataTypeOperationCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DataTypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -216,17 +206,17 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataTypeNameEditPartCN) {
+ if(childEditPart instanceof DataTypeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
+ if(childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
- pane.remove(((DataTypeAttributeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((DataTypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
+ if(childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
- pane.remove(((DataTypeOperationCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((DataTypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
return false;
@@ -235,9 +225,8 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -246,9 +235,8 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -257,15 +245,14 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DataTypeAttributeCompartmentEditPartCN) {
+ if(editPart instanceof DataTypeAttributeCompartmentEditPartCN) {
return getPrimaryShape().getAttributeCompartmentFigure();
}
- if (editPart instanceof DataTypeOperationCompartmentEditPartCN) {
+ if(editPart instanceof DataTypeOperationCompartmentEditPartCN) {
return getPrimaryShape().getOperationCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -274,21 +261,15 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DataTypeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof DataTypeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -296,29 +277,24 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -329,9 +305,8 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -340,9 +315,8 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -350,7 +324,6 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -358,17 +331,15 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
}
@@ -376,15 +347,14 @@ public class DataTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @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.Property_3101) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.Property_3101)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID));
}
- if (type == UMLElementTypes.Operation_3102) {
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.Operation_3102)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeOperationCompartmentEditPartCN.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPart.java
index 3e2c1a0aef2..68cc11ef490 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DataType_2068, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DataTypeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DataTypeFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPartCN.java
index 82e0d29ca9f..ddfdfff0607 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DataType_3080, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DataTypeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DataTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java
index 178f9fb4039..048617e9f4a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DataType_2068, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DataTypeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java
index f138924131c..41ab119cdef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DataType_3080, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DataTypeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java
index cb15d07caf2..82e36445d4a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DataTypeOperationCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DataTypeOperationCompartmentEditPart extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7034;
-
- /**
- * @generated
- */
- public DataTypeOperationCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DataTypeOperationCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeOperationCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DataTypeOperationCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7034;
+
+ /**
+ * @generated
+ */
+ public DataTypeOperationCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DataTypeOperationCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java
index 7785f10a085..8df78130fad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DataTypeOperationCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DataTypeOperationCompartmentEditPartCN extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7037;
-
- /**
- * @generated
- */
- public DataTypeOperationCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DataTypeOperationCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeOperationCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DataTypeOperationCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7037;
+
+ /**
+ * @generated
+ */
+ public DataTypeOperationCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DataTypeOperationCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java
index 13dde21aa72..c157ceadc12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyEditPart.java
index a20b3d3655e..eec3c958843 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DependencyItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +41,21 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DependencyNameEditPart) {
- ((DependencyNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DependencyNameEditPart) {
+ ((DependencyNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
- ((DependencyAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof DependencyAppliedStereotypeEditPart) {
+ ((DependencyAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +63,8 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +74,10 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DependencyNameEditPart) {
+ if(childEditPart instanceof DependencyNameEditPart) {
return true;
}
- if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
+ if(childEditPart instanceof DependencyAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +86,8 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +95,12 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* 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();
}
@@ -115,8 +108,7 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
+ return (DashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java
index a07313f373a..0c78ba32efa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java
index 8ea8dcc087a..187f81ad26c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentEditPart.java
index 157cbb1f240..a09d998ee4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeploymentItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeDeploymentLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeDeploymentLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentNameEditPart) {
- ((DeploymentNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DeploymentNameEditPart) {
+ ((DeploymentNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
- ((DeploymentAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
+ ((DeploymentAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentNameEditPart) {
+ if(childEditPart instanceof DeploymentNameEditPart) {
return true;
}
- if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
+ if(childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* 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();
}
@@ -115,8 +109,7 @@ public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITr
/**
* @generated
*/
- @Override
public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
+ return (DashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java
index a3aa6fc3f37..4a560e257be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java
index 0b5463c0fe9..f1aab6b79e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeploymentSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentSpecificationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentSpecificationNameEditPart) {
- ((DeploymentSpecificationNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DeploymentSpecificationNameEditPart) {
+ ((DeploymentSpecificationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentSpecificationNameEditPart) {
+ if(childEditPart instanceof DeploymentSpecificationNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DeploymentSpecificationFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof DeploymentSpecificationFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class DeploymentSpecificationEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java
index 57bd8d511f7..162e3605a43 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeploymentSpecificationItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentSpecificationItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentSpecificationNameEditPartCN) {
- ((DeploymentSpecificationNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DeploymentSpecificationNameEditPartCN) {
+ ((DeploymentSpecificationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentSpecificationNameEditPartCN) {
+ if(childEditPart instanceof DeploymentSpecificationNameEditPartCN) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DeploymentSpecificationFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof DeploymentSpecificationFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class DeploymentSpecificationEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPart.java
index eda33a0119e..7326effe643 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DeploymentSpecification_2078, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DeploymentSpecificationFloatingLabelEditPart extends FloatingLabelE
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPartCN.java
index bdd11e2b97d..d8ac3748a09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DeploymentSpecification_3092, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DeploymentSpecificationFloatingLabelEditPartCN extends FloatingLabe
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java
index 3a2a3fc58cd..281d86c9cf9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DeploymentSpecification_2078, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentSpecificationNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java
index 70a08172c8b..03292db5dcd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DeploymentSpecification_3092, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentSpecificationNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java
index a8cd0079288..a62935a2c79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7070;
-
- /**
- * @generated
- */
- public DeviceCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DeviceCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7070;
+
+ /**
+ * @generated
+ */
+ public DeviceCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DeviceCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java
index 05616adfc59..7703616f1fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7057;
-
- /**
- * @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(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7057;
+
+ /**
+ * @generated
+ */
+ public DeviceCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DeviceCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java
index 0f1c749db13..84d92be2be1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeviceCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,24 +119,23 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DeviceCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -154,74 +155,61 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 DeviceCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure
- *
* @generated
*/
- @Override
public DeviceCompositeFigure getPrimaryShape() {
- return (DeviceCompositeFigure) primaryShape;
+ return (DeviceCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceCompositeNameEditPart) {
- ((DeviceCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DeviceCompositeNameEditPart) {
+ ((DeviceCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DeviceCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -229,16 +217,16 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceCompositeNameEditPart) {
+ if(childEditPart instanceof DeviceCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
+ if(childEditPart instanceof DeviceCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((DeviceCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((DeviceCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -247,9 +235,8 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -258,9 +245,8 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -269,12 +255,11 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DeviceCompositeCompartmentEditPart) {
+ if(editPart instanceof DeviceCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -283,21 +268,15 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DeviceCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof DeviceCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -305,29 +284,24 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -338,9 +312,8 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -349,9 +322,8 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -359,7 +331,6 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -367,17 +338,15 @@ public class DeviceCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java
index b5e3aae511d..f9fabc21038 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DeviceCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,24 +119,23 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -154,74 +155,61 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 DeviceCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.DeviceCompositeFigure
- *
* @generated
*/
- @Override
public DeviceCompositeFigure getPrimaryShape() {
- return (DeviceCompositeFigure) primaryShape;
+ return (DeviceCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceCompositeNameEditPartCN) {
- ((DeviceCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DeviceCompositeNameEditPartCN) {
+ ((DeviceCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DeviceCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -229,16 +217,16 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceCompositeNameEditPartCN) {
+ if(childEditPart instanceof DeviceCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((DeviceCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((DeviceCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -247,9 +235,8 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -258,9 +245,8 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -269,12 +255,11 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ if(editPart instanceof DeviceCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -283,21 +268,15 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DeviceCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof DeviceCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -305,29 +284,24 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -338,9 +312,8 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -349,9 +322,8 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -359,7 +331,6 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -367,17 +338,15 @@ public class DeviceCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPart.java
index cb2ca303fc6..cf2974a9aa0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Device_2070, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeviceCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DeviceCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPartCN.java
index 622e59a00ab..b60a71e2f5e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Device_3082, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DeviceCompositeFloatingLabelEditPartCN extends FloatingLabelEditPar
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java
index daadd40f3ee..a8931512428 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Device_2070, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeviceCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java
index 5439c16058d..c7a8bae4a6a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Device_3082, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeviceCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java
index b138bb51f75..feee70e0f18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.DurationConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintNameEditPart) {
- ((DurationConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DurationConstraintNameEditPart) {
+ ((DurationConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof DurationConstraintSpecificationEditPart) {
- ((DurationConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof DurationConstraintSpecificationEditPart) {
+ ((DurationConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintNameEditPart) {
+ if(childEditPart instanceof DurationConstraintNameEditPart) {
return true;
}
- if (childEditPart instanceof DurationConstraintSpecificationEditPart) {
+ if(childEditPart instanceof DurationConstraintSpecificationEditPart) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java
index b47f86c8c0b..f335e059438 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.DurationConstraintItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintNameEditPartCN) {
- ((DurationConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DurationConstraintNameEditPartCN) {
+ ((DurationConstraintNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof DurationConstraintSpecificationEditPartCN) {
- ((DurationConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof DurationConstraintSpecificationEditPartCN) {
+ ((DurationConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintNameEditPartCN) {
+ if(childEditPart instanceof DurationConstraintNameEditPartCN) {
return true;
}
- if (childEditPart instanceof DurationConstraintSpecificationEditPartCN) {
+ if(childEditPart instanceof DurationConstraintSpecificationEditPartCN) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java
index dfde29809e1..f9b3c827153 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_2110, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationConstraintNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java
index 1b59ba8c50d..78120417337 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3116, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationConstraintNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java
index fb596bc2a00..bff86286196 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_2110, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationConstraintSpecificationEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java
index 83238ad4931..3e8367b8974 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3116, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationConstraintSpecificationEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java
index 0e88e957014..c76458a5f8d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DurationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DurationFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationNameEditPart) {
- ((DurationNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DurationNameEditPart) {
+ ((DurationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationNameEditPart) {
+ if(childEditPart instanceof DurationNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof DurationFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class DurationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationFloatingLabelEditPart.java
index 8a215b40d8b..4c090f7724c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DurationFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Duration_2104, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DurationFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java
index a20c516d2a6..8c06fe463c4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DurationIntervalItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationIntervalItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DurationIntervalFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationIntervalNameEditPart) {
- ((DurationIntervalNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof DurationIntervalNameEditPart) {
+ ((DurationIntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationIntervalNameEditPart) {
+ if(childEditPart instanceof DurationIntervalNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationIntervalFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof DurationIntervalFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class DurationIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationIntervalNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalFloatingLabelEditPart.java
index ed7084771c2..a03c9114764 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationInterval_2106, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationIntervalFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class DurationIntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java
index 1897b014c5a..1e19ba1106e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationInterval_2106, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationIntervalNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java
index e1d877b34ba..e3bb6bcc5b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Duration_2104, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java
index d5b7acca4eb..dfff017860a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +48,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.ObservationLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DurationObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,10 +81,10 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationObservationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -102,23 +103,22 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case DurationObservationNameEditPart.VISUAL_ID:
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,68 +138,56 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.composite.custom.figures.DurationObservationNodeFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationObservationNameEditPart) {
+ if(borderItemEditPart instanceof DurationObservationNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof DurationObservationStereotypeLabelEditPart) {
+ } else if(borderItemEditPart instanceof DurationObservationStereotypeLabelEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
@@ -207,27 +195,22 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
}
@@ -235,9 +218,8 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -246,9 +228,8 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -256,7 +237,6 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -264,17 +244,15 @@ public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationObservationNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEventEditPart.java
index bac07202906..7e568b7f119 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,8 +16,8 @@ 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.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.DurationObservationEventItemSemanticEditPolicy;
/**
* @generated
@@ -39,21 +39,19 @@ public class DurationObservationEventEditPart extends ConnectionEditPart impleme
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationObservationEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
}
/**
* 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 SimpleDashedEdgeFigure();
}
@@ -61,8 +59,7 @@ public class DurationObservationEventEditPart extends ConnectionEditPart impleme
/**
* @generated
*/
- @Override
public SimpleDashedEdgeFigure getPrimaryShape() {
- return (SimpleDashedEdgeFigure) getFigure();
+ return (SimpleDashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java
index aa04ba29fad..4bdf4b1e1e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -113,14 +113,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -141,7 +139,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -152,12 +149,11 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -165,12 +161,11 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @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();
+ 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));
}
@@ -178,12 +173,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -191,12 +186,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -204,12 +199,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -217,20 +212,19 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -241,7 +235,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -249,7 +242,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -281,12 +273,10 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -295,30 +285,26 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -331,31 +317,27 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -365,9 +347,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -376,7 +357,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -384,9 +364,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_2093, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationNameEditPart.VISUAL_ID));
}
return parser;
@@ -396,10 +375,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -428,8 +405,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -437,8 +414,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -447,56 +424,47 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -518,15 +486,14 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -540,7 +507,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -555,27 +521,26 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -583,18 +548,15 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -603,27 +565,19 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -631,7 +585,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -639,13 +592,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -655,10 +607,9 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -669,9 +620,8 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -692,31 +642,30 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -724,7 +673,7 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -734,13 +683,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -750,25 +698,20 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -778,13 +721,12 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -800,31 +742,26 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -837,7 +774,6 @@ public class DurationObservationNameEditPart extends FloatingLabelEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java
index 418a8f27c9c..ee48473de1f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -143,7 +141,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -155,12 +152,11 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -168,12 +164,11 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @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();
+ 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));
}
@@ -181,12 +176,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -194,12 +189,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -207,12 +202,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -220,20 +215,19 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -244,7 +238,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -252,7 +245,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -284,12 +276,10 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -298,30 +288,26 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -334,31 +320,27 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -368,9 +350,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -379,7 +360,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -387,9 +367,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_2093, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationStereotypeLabelEditPart.VISUAL_ID));
}
return parser;
@@ -399,10 +378,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -431,8 +408,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -440,8 +417,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -450,56 +427,47 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -521,15 +489,14 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -543,7 +510,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -558,27 +524,26 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -586,18 +551,15 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -606,27 +568,19 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -634,7 +588,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -642,13 +595,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -658,10 +610,9 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -672,9 +623,8 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -695,31 +645,30 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -727,7 +676,7 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -737,13 +686,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -753,25 +701,20 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -781,13 +724,12 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -803,31 +745,26 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -840,7 +777,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java
index 01fc12f4395..5c277652fb9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -39,6 +39,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,13 +49,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNo
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;
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.EnumerationFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.EnumerationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
import org.eclipse.swt.graphics.Color;
@@ -87,11 +88,11 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EnumerationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
@@ -111,22 +112,21 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case EnumerationFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -146,64 +146,55 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 EnumerationFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure
- *
* @generated
*/
- @Override
public EnumerationFigure getPrimaryShape() {
- return (EnumerationFigure) primaryShape;
+ return (EnumerationFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof EnumerationNameEditPart) {
- ((EnumerationNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof EnumerationNameEditPart) {
+ ((EnumerationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
+ if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((EnumerationEnumerationLiteralCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((EnumerationEnumerationLiteralCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -211,12 +202,12 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof EnumerationNameEditPart) {
+ if(childEditPart instanceof EnumerationNameEditPart) {
return true;
}
- if (childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
+ if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
- pane.remove(((EnumerationEnumerationLiteralCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((EnumerationEnumerationLiteralCompartmentEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -225,9 +216,8 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -236,9 +226,8 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -247,12 +236,11 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
+ if(editPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
return getPrimaryShape().getEnumerationLiteralCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -261,21 +249,15 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof EnumerationFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof EnumerationFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -283,29 +265,24 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -316,9 +293,8 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -327,9 +303,8 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -337,7 +312,6 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -345,17 +319,15 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
}
@@ -363,12 +335,11 @@ public class EnumerationEditPart extends RoundedCompartmentEditPart {
/**
* @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.EnumerationLiteral_3066) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.EnumerationLiteral_3066)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java
index 222755bd98c..7a9ca8f2bc9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -39,6 +39,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,13 +49,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNo
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;
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.EnumerationFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.EnumerationItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
import org.eclipse.swt.graphics.Color;
@@ -87,11 +88,11 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EnumerationItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
@@ -111,22 +112,21 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case EnumerationFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -146,64 +146,55 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 EnumerationFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure
- *
* @generated
*/
- @Override
public EnumerationFigure getPrimaryShape() {
- return (EnumerationFigure) primaryShape;
+ return (EnumerationFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof EnumerationNameEditPartCN) {
- ((EnumerationNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof EnumerationNameEditPartCN) {
+ ((EnumerationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
+ if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((EnumerationEnumerationLiteralCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((EnumerationEnumerationLiteralCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -211,12 +202,12 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof EnumerationNameEditPartCN) {
+ if(childEditPart instanceof EnumerationNameEditPartCN) {
return true;
}
- if (childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
+ if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
- pane.remove(((EnumerationEnumerationLiteralCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((EnumerationEnumerationLiteralCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
return false;
@@ -225,9 +216,8 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -236,9 +226,8 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -247,12 +236,11 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
+ if(editPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
return getPrimaryShape().getEnumerationLiteralCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -261,21 +249,15 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof EnumerationFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof EnumerationFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -283,29 +265,24 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -316,9 +293,8 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -327,9 +303,8 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -337,7 +312,6 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -345,17 +319,15 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
}
@@ -363,12 +335,11 @@ public class EnumerationEditPartCN extends RoundedCompartmentEditPart {
/**
* @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.EnumerationLiteral_3066) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(UMLElementTypes.isKindOf(type, UMLElementTypes.EnumerationLiteral_3066)) {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
index 8759caa8c35..a8c90563602 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class EnumerationEnumerationLiteralCompartmentEditPart extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7048;
-
- /**
- * @generated
- */
- public EnumerationEnumerationLiteralCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.EnumerationEnumerationLiteralCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class EnumerationEnumerationLiteralCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7048;
+
+ /**
+ * @generated
+ */
+ public EnumerationEnumerationLiteralCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.EnumerationEnumerationLiteralCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
index 99571146232..6a3e0bb3204 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
@@ -1,144 +1,130 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class EnumerationEnumerationLiteralCompartmentEditPartCN extends ListCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7049;
-
- /**
- * @generated
- */
- public EnumerationEnumerationLiteralCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.EnumerationEnumerationLiteralCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class EnumerationEnumerationLiteralCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7049;
+
+ /**
+ * @generated
+ */
+ public EnumerationEnumerationLiteralCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.EnumerationEnumerationLiteralCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPart.java
index 776391a75da..1190510e97a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_2067, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.EnumerationFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class EnumerationFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPartCN.java
index dab5d5b9655..47040590599 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_3079, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.EnumerationFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class EnumerationFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java
index 12397bf54ee..47e5fc362d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -67,13 +67,13 @@ 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.editpolicies.DefaultSemanticEditPolicy;
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.composite.edit.policies.EnumerationLiteralItemSemanticEditPolicyCLN;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
@@ -122,14 +122,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -144,9 +142,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public DragTracker getDragTracker(Request request) {
- if (request instanceof SelectionRequest && ((SelectionRequest) request).getLastButtonPressed() == 3) {
+ if(request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3) {
return null;
}
return new DragEditPartsTrackerEx(this);
@@ -155,10 +152,9 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EnumerationLiteralItemSemanticEditPolicyCLN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -168,12 +164,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -181,12 +177,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -194,12 +190,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -207,20 +203,19 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -231,7 +226,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -239,7 +233,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -247,7 +240,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -264,12 +256,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -282,12 +274,10 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -296,30 +286,26 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -332,31 +318,27 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -366,9 +348,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -377,7 +358,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -385,9 +365,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.EnumerationLiteral_3066, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.EnumerationLiteralEditPartCLN.VISUAL_ID));
}
return parser;
@@ -397,10 +376,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -429,8 +406,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -438,8 +415,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -448,56 +425,47 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -519,15 +487,14 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -541,7 +508,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -556,27 +522,26 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -584,18 +549,15 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -604,27 +566,19 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -632,7 +586,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -640,13 +593,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -656,10 +608,9 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -670,9 +621,8 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -693,31 +643,30 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -725,7 +674,7 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -735,13 +684,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -751,25 +699,20 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -779,13 +722,12 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -801,7 +743,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -810,7 +751,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -819,41 +759,36 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
- if (UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
+ if(UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
refreshUnderline();
}
super.handleNotificationEvent(event);
@@ -862,7 +797,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java
index 6453fbeab9f..a4f778d9c3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_2067, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.EnumerationNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java
index 235e5b5fc96..4d9ff0d61df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_3079, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.EnumerationNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
index ff41aced447..8be724d9497 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7071;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ExecutionEnvironmentCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7071;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ExecutionEnvironmentCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
index 91b8490225a..06f4cd2d20d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7058;
-
- /**
- * @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(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7058;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ExecutionEnvironmentCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java
index 402656d4f47..e61e0c09aee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ExecutionEnvironmentCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,24 +119,23 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -154,74 +155,61 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ExecutionEnvironmentCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure
- *
* @generated
*/
- @Override
public ExecutionEnvironmentCompositeFigure getPrimaryShape() {
- return (ExecutionEnvironmentCompositeFigure) primaryShape;
+ return (ExecutionEnvironmentCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentCompositeNameEditPart) {
- ((ExecutionEnvironmentCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ExecutionEnvironmentCompositeNameEditPart) {
+ ((ExecutionEnvironmentCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ExecutionEnvironmentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -229,16 +217,16 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentCompositeNameEditPart) {
+ if(childEditPart instanceof ExecutionEnvironmentCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -247,9 +235,8 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -258,9 +245,8 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -269,12 +255,11 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ if(editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -283,21 +268,15 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ExecutionEnvironmentCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ExecutionEnvironmentCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -305,29 +284,24 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -338,9 +312,8 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -349,9 +322,8 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -359,7 +331,6 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -367,17 +338,15 @@ public class ExecutionEnvironmentCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java
index 695a278fec3..c5ce2e85082 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ExecutionEnvironmentCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,24 +119,23 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -154,74 +155,61 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ExecutionEnvironmentCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ExecutionEnvironmentCompositeFigure
- *
* @generated
*/
- @Override
public ExecutionEnvironmentCompositeFigure getPrimaryShape() {
- return (ExecutionEnvironmentCompositeFigure) primaryShape;
+ return (ExecutionEnvironmentCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentCompositeNameEditPartCN) {
- ((ExecutionEnvironmentCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ExecutionEnvironmentCompositeNameEditPartCN) {
+ ((ExecutionEnvironmentCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ExecutionEnvironmentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -229,16 +217,16 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentCompositeNameEditPartCN) {
+ if(childEditPart instanceof ExecutionEnvironmentCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -247,9 +235,8 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -258,9 +245,8 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -269,12 +255,11 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ if(editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -283,21 +268,15 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ExecutionEnvironmentCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ExecutionEnvironmentCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -305,29 +284,24 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -338,9 +312,8 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -349,9 +322,8 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -359,7 +331,6 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -367,17 +338,15 @@ public class ExecutionEnvironmentCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPart.java
index 73671566797..a70a5b82dd7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_2071, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPart extends Floating
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPartCN.java
index f361adf7931..cd3570904dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_3083, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ExecutionEnvironmentCompositeFloatingLabelEditPartCN extends Floati
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java
index 8343d1b343b..fd391c710d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_2071, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java
index 82b4d3edf02..11a20704afa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_3083, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java
index 60ebb67f6db..054b7a8bdf6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ExpressionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExpressionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ExpressionFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExpressionNameEditPart) {
- ((ExpressionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ExpressionNameEditPart) {
+ ((ExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExpressionNameEditPart) {
+ if(childEditPart instanceof ExpressionNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ExpressionFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ExpressionFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class ExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExpressionNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionFloatingLabelEditPart.java
index 4a39aa0dafc..f8bc91ccffc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Expression_2103, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExpressionFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java
index 55a4f5b96cb..8071116eed2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Expression_2103, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ExpressionNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java
index 30a87e2bbc9..af512ca6ad8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7067;
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.FunctionBehaviorCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class FunctionBehaviorCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7067;
+
+ /**
+ * @generated
+ */
+ public FunctionBehaviorCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.FunctionBehaviorCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java
index 34d975d7fe2..99bd045c5fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7054;
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.FunctionBehaviorCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class FunctionBehaviorCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7054;
+
+ /**
+ * @generated
+ */
+ public FunctionBehaviorCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.FunctionBehaviorCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java
index d09f575f3bb..78dfe7d23ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.FunctionBehaviorCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FunctionBehaviorCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 FunctionBehaviorCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure
- *
* @generated
*/
- @Override
public FunctionBehaviorCompositeFigure getPrimaryShape() {
- return (FunctionBehaviorCompositeFigure) primaryShape;
+ return (FunctionBehaviorCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof FunctionBehaviorCompositeNameEditPart) {
- ((FunctionBehaviorCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof FunctionBehaviorCompositeNameEditPart) {
+ ((FunctionBehaviorCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
+ if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((FunctionBehaviorCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((FunctionBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof FunctionBehaviorCompositeNameEditPart) {
+ if(childEditPart instanceof FunctionBehaviorCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
+ if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((FunctionBehaviorCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((FunctionBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
+ if(editPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof FunctionBehaviorCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof FunctionBehaviorCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class FunctionBehaviorCompositeEditPart extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java
index 4eb8462e899..e3a6316e192 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.FunctionBehaviorCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FunctionBehaviorCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 FunctionBehaviorCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.FunctionBehaviorCompositeFigure
- *
* @generated
*/
- @Override
public FunctionBehaviorCompositeFigure getPrimaryShape() {
- return (FunctionBehaviorCompositeFigure) primaryShape;
+ return (FunctionBehaviorCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof FunctionBehaviorCompositeNameEditPartCN) {
- ((FunctionBehaviorCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof FunctionBehaviorCompositeNameEditPartCN) {
+ ((FunctionBehaviorCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((FunctionBehaviorCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((FunctionBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof FunctionBehaviorCompositeNameEditPartCN) {
+ if(childEditPart instanceof FunctionBehaviorCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((FunctionBehaviorCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((FunctionBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
+ if(editPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof FunctionBehaviorCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof FunctionBehaviorCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class FunctionBehaviorCompositeEditPartCN extends RoundedCompartmentEditP
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPart.java
index 8b56ad279f1..9b6ab255e3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.FunctionBehavior_2064, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class FunctionBehaviorCompositeFloatingLabelEditPart extends FloatingLabe
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPartCN.java
index a899ca5c565..8ca943af557 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.FunctionBehavior_3076, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class FunctionBehaviorCompositeFloatingLabelEditPartCN extends FloatingLa
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java
index 09d1b43ae54..fa5c1a50102 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.FunctionBehavior_2064, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.FunctionBehaviorCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java
index 5ed8d5aa12e..136fce6bc5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.FunctionBehavior_3076, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index 0d5c8ca7df1..7ba4d167a4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationEditPart.java
index a27cda73ddd..99ac9af0b96 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.figure.edge.GeneralizationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.GeneralizationItemSemanticEditPolicy;
/**
* @generated
@@ -42,20 +41,18 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
- ((GeneralizationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
+ ((GeneralizationAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -63,9 +60,8 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -75,7 +71,7 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
+ if(childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -84,9 +80,8 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -94,13 +89,12 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
/**
* 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();
}
@@ -108,8 +102,7 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
public GeneralizationFigure getPrimaryShape() {
- return (GeneralizationFigure) getFigure();
+ return (GeneralizationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java
index 96339fefc2c..62f74de8534 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java
index 7bbb62176dd..9df63bab22e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -114,14 +113,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -140,22 +137,20 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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(AbstractCustomLabelEditPolicy.SPECIFIC_NAME_LABEL_POLICY, new InformationFlowCustomLabelEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ installEditPolicy(AbstractCustomLabelEditPolicy.SPECIFIC_NAME_LABEL_POLICY, new InformationFlowCustomLabelEditPolicy());
}
/**
* @generated
*/
- @Override
public int getKeyPoint() {
return ConnectionLocator.MIDDLE;
}
@@ -164,12 +159,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -177,12 +172,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -190,12 +185,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -203,20 +198,19 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -227,7 +221,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -235,7 +228,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -243,7 +235,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -253,7 +244,7 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
*/
protected EObject getParserElement() {
EObject element = resolveSemanticElement();
- return element != null ? element : (View) getModel();
+ return element != null ? element : (View)getModel();
}
/**
@@ -269,12 +260,10 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -283,30 +272,26 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -319,31 +304,27 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -353,9 +334,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -364,7 +344,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -372,9 +351,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowConveyedLabelEditPart.VISUAL_ID));
}
return parser;
@@ -384,10 +362,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -416,8 +392,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -425,8 +401,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -435,56 +411,47 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -506,15 +473,14 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -528,7 +494,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -543,20 +508,20 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +529,15 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +546,19 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +566,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +573,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +588,9 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +601,8 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +623,30 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +654,7 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +664,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +679,20 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +702,12 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,45 +723,38 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowEditPart.java
index 4068d7dc1d8..18b932ca7b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeInformationFlowLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationFlowFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InformationFlowItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InformationFlowItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeInformationFlowLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeInformationFlowLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationFlowConveyedLabelEditPart) {
- ((InformationFlowConveyedLabelEditPart) childEditPart).setLabel(
- getPrimaryShape().getConveyedLabel());
+ if(childEditPart instanceof InformationFlowConveyedLabelEditPart) {
+ ((InformationFlowConveyedLabelEditPart)childEditPart).setLabel(getPrimaryShape().getConveyedLabel());
}
- if (childEditPart instanceof InformationFlowAppliedStereotypeEditPart) {
- ((InformationFlowAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof InformationFlowAppliedStereotypeEditPart) {
+ ((InformationFlowAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationFlowConveyedLabelEditPart) {
+ if(childEditPart instanceof InformationFlowConveyedLabelEditPart) {
return true;
}
- if (childEditPart instanceof InformationFlowAppliedStereotypeEditPart) {
+ if(childEditPart instanceof InformationFlowAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
/**
* 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 InformationFlowFigure();
}
@@ -115,8 +109,7 @@ public class InformationFlowEditPart extends UMLConnectionNodeEditPart implement
/**
* @generated
*/
- @Override
public InformationFlowFigure getPrimaryShape() {
- return (InformationFlowFigure) getFigure();
+ return (InformationFlowFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java
index de5d86e5ca6..85b490e260b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +48,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InformationItemItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,10 +81,10 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InformationItemItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -101,22 +102,21 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InformationItemFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -136,57 +136,49 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InformationItemFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure
- *
* @generated
*/
- @Override
public InformationItemFigure getPrimaryShape() {
- return (InformationItemFigure) primaryShape;
+ return (InformationItemFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationItemNameEditPart) {
- ((InformationItemNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InformationItemNameEditPart) {
+ ((InformationItemNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -194,7 +186,7 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationItemNameEditPart) {
+ if(childEditPart instanceof InformationItemNameEditPart) {
return true;
}
return false;
@@ -203,9 +195,8 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -214,9 +205,8 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -225,9 +215,8 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -236,21 +225,15 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InformationItemFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof InformationItemFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(80, 40);
return result;
@@ -258,29 +241,24 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -291,9 +269,8 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -302,9 +279,8 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -312,7 +288,6 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -320,17 +295,15 @@ public class InformationItemEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InformationItemNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java
index abda0ea7bc7..42a394721c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +48,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InformationItemItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,10 +81,10 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InformationItemItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -101,22 +102,21 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InformationItemFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -136,57 +136,49 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InformationItemFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InformationItemFigure
- *
* @generated
*/
- @Override
public InformationItemFigure getPrimaryShape() {
- return (InformationItemFigure) primaryShape;
+ return (InformationItemFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationItemNameEditPartCN) {
- ((InformationItemNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InformationItemNameEditPartCN) {
+ ((InformationItemNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -194,7 +186,7 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InformationItemNameEditPartCN) {
+ if(childEditPart instanceof InformationItemNameEditPartCN) {
return true;
}
return false;
@@ -203,9 +195,8 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -214,9 +205,8 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -225,9 +215,8 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -236,21 +225,15 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InformationItemFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof InformationItemFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(80, 40);
return result;
@@ -258,29 +241,24 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -291,9 +269,8 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -302,9 +279,8 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -312,7 +288,6 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -320,17 +295,15 @@ public class InformationItemEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InformationItemNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPart.java
index c212912a368..039c5f60b38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_2080, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationItemFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InformationItemFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPartCN.java
index a5b8dc28ff5..512f34892cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_3094, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationItemFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InformationItemFloatingLabelEditPartCN extends FloatingLabelEditPar
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java
index 463023540cc..68563f6e4ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_2080, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationItemNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java
index 4fd5532d2ae..fb30fbfc9aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_3094, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationItemNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java
index 0bd1843e65b..c46ff0e1336 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InstanceValueItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InstanceValueItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InstanceValueFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InstanceValueNameEditPart) {
- ((InstanceValueNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InstanceValueNameEditPart) {
+ ((InstanceValueNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InstanceValueNameEditPart) {
+ if(childEditPart instanceof InstanceValueNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InstanceValueFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof InstanceValueFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class InstanceValueEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InstanceValueNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueFloatingLabelEditPart.java
index ec4ad5568a8..2eb6f64e024 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InstanceValue_2108, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InstanceValueFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InstanceValueFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java
index 9f514d1784d..e01faea4134 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InstanceValue_2108, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InstanceValueNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java
index 7c3a115bfd5..1094fd00b83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InteractionCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class InteractionCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7064;
-
- /**
- * @generated
- */
- public InteractionCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.InteractionCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class InteractionCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7064;
+
+ /**
+ * @generated
+ */
+ public InteractionCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.InteractionCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java
index 79213406885..b28ce9c1824 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InteractionCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class InteractionCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7051;
-
- /**
- * @generated
- */
- public InteractionCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.InteractionCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class InteractionCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7051;
+
+ /**
+ * @generated
+ */
+ public InteractionCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.InteractionCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java
index 77c0814b083..aa7b41b7bfd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InteractionCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InteractionCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InteractionCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure
- *
* @generated
*/
- @Override
public InteractionCompositeFigure getPrimaryShape() {
- return (InteractionCompositeFigure) primaryShape;
+ return (InteractionCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionCompositeNameEditPart) {
- ((InteractionCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InteractionCompositeNameEditPart) {
+ ((InteractionCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof InteractionCompositeCompartmentEditPart) {
+ if(childEditPart instanceof InteractionCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((InteractionCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((InteractionCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionCompositeNameEditPart) {
+ if(childEditPart instanceof InteractionCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof InteractionCompositeCompartmentEditPart) {
+ if(childEditPart instanceof InteractionCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((InteractionCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((InteractionCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof InteractionCompositeCompartmentEditPart) {
+ if(editPart instanceof InteractionCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InteractionCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof InteractionCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class InteractionCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java
index c4c1e923302..02ae2d5e1f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InteractionCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InteractionCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InteractionCompositeFigure
- *
* @generated
*/
- @Override
public InteractionCompositeFigure getPrimaryShape() {
- return (InteractionCompositeFigure) primaryShape;
+ return (InteractionCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionCompositeNameEditPartCN) {
- ((InteractionCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InteractionCompositeNameEditPartCN) {
+ ((InteractionCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof InteractionCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof InteractionCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((InteractionCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((InteractionCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionCompositeNameEditPartCN) {
+ if(childEditPart instanceof InteractionCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof InteractionCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof InteractionCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((InteractionCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((InteractionCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof InteractionCompositeCompartmentEditPartCN) {
+ if(editPart instanceof InteractionCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InteractionCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof InteractionCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class InteractionCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPart.java
index 862b4ded18b..4c2b77fb5db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_2061, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InteractionCompositeFloatingLabelEditPart extends FloatingLabelEdit
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPartCN.java
index 53dacc1e6b6..b9389b0bb1a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_3073, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InteractionCompositeFloatingLabelEditPartCN extends FloatingLabelEd
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java
index a163b13a107..9eba8bb923e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_2061, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java
index 6c77a4029b0..b291e0a43f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_3073, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java
index 5c6ba3b0df0..aee217157d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.InteractionConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionConstraintNameEditPart) {
- ((InteractionConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InteractionConstraintNameEditPart) {
+ ((InteractionConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof InteractionConstraintSpecificationEditPart) {
- ((InteractionConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof InteractionConstraintSpecificationEditPart) {
+ ((InteractionConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionConstraintNameEditPart) {
+ if(childEditPart instanceof InteractionConstraintNameEditPart) {
return true;
}
- if (childEditPart instanceof InteractionConstraintSpecificationEditPart) {
+ if(childEditPart instanceof InteractionConstraintSpecificationEditPart) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionConstraintNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java
index 5ce2b772787..1e7c115b21f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.InteractionConstraintItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionConstraintNameEditPartCN) {
- ((InteractionConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InteractionConstraintNameEditPartCN) {
+ ((InteractionConstraintNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof InteractionConstraintSpecificationEditPartCN) {
- ((InteractionConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof InteractionConstraintSpecificationEditPartCN) {
+ ((InteractionConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InteractionConstraintNameEditPartCN) {
+ if(childEditPart instanceof InteractionConstraintNameEditPartCN) {
return true;
}
- if (childEditPart instanceof InteractionConstraintSpecificationEditPartCN) {
+ if(childEditPart instanceof InteractionConstraintSpecificationEditPartCN) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionConstraintNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java
index 360efa6f965..b86fb8c8225 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InteractionConstraint_2113, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionConstraintNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java
index 63c057247fd..2a59ef25d76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InteractionConstraint_3119, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionConstraintNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java
index 8012ffbc3ce..dd65b8a490b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InteractionConstraint_2113, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionConstraintSpecificationEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java
index 88c32582ab1..fcd2e4a08de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InteractionConstraint_3119, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionConstraintSpecificationEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java
index 37df6a9ae34..f75c5a8caa7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -47,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierCon
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,10 +82,10 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -103,22 +104,21 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InterfaceFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +138,49 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InterfaceCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure
- *
* @generated
*/
- @Override
public InterfaceCompositeFigure getPrimaryShape() {
- return (InterfaceCompositeFigure) primaryShape;
+ return (InterfaceCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceNameEditPart) {
- ((InterfaceNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InterfaceNameEditPart) {
+ ((InterfaceNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +188,7 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceNameEditPart) {
+ if(childEditPart instanceof InterfaceNameEditPart) {
return true;
}
return false;
@@ -205,9 +197,8 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +207,8 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +217,8 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +227,15 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InterfaceFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof InterfaceFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +243,24 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +271,8 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +281,8 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +290,6 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +297,15 @@ public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java
index 85eb6cd0e71..e56c97191b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -47,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierCon
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InterfaceItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,10 +82,10 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -103,22 +104,21 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case InterfaceFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +138,49 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 InterfaceCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.InterfaceCompositeFigure
- *
* @generated
*/
- @Override
public InterfaceCompositeFigure getPrimaryShape() {
- return (InterfaceCompositeFigure) primaryShape;
+ return (InterfaceCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceNameEditPartCN) {
- ((InterfaceNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InterfaceNameEditPartCN) {
+ ((InterfaceNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +188,7 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceNameEditPartCN) {
+ if(childEditPart instanceof InterfaceNameEditPartCN) {
return true;
}
return false;
@@ -205,9 +197,8 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +207,8 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +217,8 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +227,15 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InterfaceFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof InterfaceFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +243,24 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +271,8 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +281,8 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +290,6 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +297,15 @@ public class InterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InterfaceNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPart.java
index 5bc47c0ea87..95011c8ccc8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interface_2076, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InterfaceFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPartCN.java
index 013bae3b94b..53321054ef8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3087, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class InterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java
index 0e29b239a4f..7a1bbf9d535 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interface_2076, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java
index 651352d0b81..0c82419ae0a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3087, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java
index 859aad761c9..20d055006da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationEditPart.java
index 2f94e063bb6..fbea73149c6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.figure.edge.InterfaceRealizationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.InterfaceRealizationItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +41,21 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceRealizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceRealizationNameEditPart) {
- ((InterfaceRealizationNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof InterfaceRealizationNameEditPart) {
+ ((InterfaceRealizationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof InterfaceRealizationAppliedStereotypeEditPart) {
- ((InterfaceRealizationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof InterfaceRealizationAppliedStereotypeEditPart) {
+ ((InterfaceRealizationAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +63,8 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +74,10 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof InterfaceRealizationNameEditPart) {
+ if(childEditPart instanceof InterfaceRealizationNameEditPart) {
return true;
}
- if (childEditPart instanceof InterfaceRealizationAppliedStereotypeEditPart) {
+ if(childEditPart instanceof InterfaceRealizationAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +86,8 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +95,12 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* 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 InterfaceRealizationFigure();
}
@@ -115,8 +108,7 @@ public class InterfaceRealizationEditPart extends UMLConnectionNodeEditPart impl
/**
* @generated
*/
- @Override
public InterfaceRealizationFigure getPrimaryShape() {
- return (InterfaceRealizationFigure) getFigure();
+ return (InterfaceRealizationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java
index 2353003d94d..dd01ca5ffa4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java
index 67e7c7d0a6f..ad8972d909d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.IntervalConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new IntervalConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalConstraintNameEditPart) {
- ((IntervalConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof IntervalConstraintNameEditPart) {
+ ((IntervalConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof IntervalConstraintSpecificationEditPart) {
- ((IntervalConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof IntervalConstraintSpecificationEditPart) {
+ ((IntervalConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalConstraintNameEditPart) {
+ if(childEditPart instanceof IntervalConstraintNameEditPart) {
return true;
}
- if (childEditPart instanceof IntervalConstraintSpecificationEditPart) {
+ if(childEditPart instanceof IntervalConstraintSpecificationEditPart) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(IntervalConstraintNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java
index fbec9622474..1c53aba4464 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.IntervalConstraintItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new IntervalConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalConstraintNameEditPartCN) {
- ((IntervalConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof IntervalConstraintNameEditPartCN) {
+ ((IntervalConstraintNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof IntervalConstraintSpecificationEditPartCN) {
- ((IntervalConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof IntervalConstraintSpecificationEditPartCN) {
+ ((IntervalConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalConstraintNameEditPartCN) {
+ if(childEditPart instanceof IntervalConstraintNameEditPartCN) {
return true;
}
- if (childEditPart instanceof IntervalConstraintSpecificationEditPartCN) {
+ if(childEditPart instanceof IntervalConstraintSpecificationEditPartCN) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(IntervalConstraintNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java
index 8369335930f..66220976e8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.IntervalConstraint_2112, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalConstraintNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java
index fcdb6fcf551..bcf69b2eb10 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.IntervalConstraint_3118, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalConstraintNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java
index a99fbaf297e..df4fc713d8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.IntervalConstraint_2112, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalConstraintSpecificationEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java
index 7b571cc1e61..821db1170e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.IntervalConstraint_3118, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalConstraintSpecificationEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java
index 477eec1e9e9..c034ad21d38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.IntervalItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new IntervalItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case IntervalFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalNameEditPart) {
- ((IntervalNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof IntervalNameEditPart) {
+ ((IntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof IntervalNameEditPart) {
+ if(childEditPart instanceof IntervalNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof IntervalFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof IntervalFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class IntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(IntervalNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalFloatingLabelEditPart.java
index f59e0f08359..f870d40d8a6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interval_2107, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class IntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java
index baca353fad7..93873dc6303 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Interval_2107, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.IntervalNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LinkDescriptorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LinkDescriptorEditPart.java
index d486d491097..efe52a9b810 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LinkDescriptorEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LinkDescriptorEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -40,7 +40,6 @@ public class LinkDescriptorEditPart extends ConnectionEditPart implements ITreeB
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ViewComponentEditPolicy());
@@ -49,13 +48,12 @@ public class LinkDescriptorEditPart extends ConnectionEditPart implements ITreeB
/**
* 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 SimpleDashedEdgeFigure();
}
@@ -63,8 +61,7 @@ public class LinkDescriptorEditPart extends ConnectionEditPart implements ITreeB
/**
* @generated
*/
- @Override
public SimpleDashedEdgeFigure getPrimaryShape() {
- return (SimpleDashedEdgeFigure) getFigure();
+ return (SimpleDashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java
index d94b8755944..670ce93a5dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.LiteralBooleanItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LiteralBooleanItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case LiteralBooleanFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralBooleanNameEditPart) {
- ((LiteralBooleanNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof LiteralBooleanNameEditPart) {
+ ((LiteralBooleanNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralBooleanNameEditPart) {
+ if(childEditPart instanceof LiteralBooleanNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof LiteralBooleanFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof LiteralBooleanFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class LiteralBooleanEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(LiteralBooleanNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanFloatingLabelEditPart.java
index 79bf741824b..9bdb2f51ab4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralBoolean_2095, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralBooleanFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class LiteralBooleanFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java
index 4784c7dc024..613ee23fadd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralBoolean_2095, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralBooleanNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java
index ad5fb3f52bb..539b9e91241 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.LiteralIntegerItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LiteralIntegerItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case LiteralIntegerFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralIntegerNameEditPart) {
- ((LiteralIntegerNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof LiteralIntegerNameEditPart) {
+ ((LiteralIntegerNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralIntegerNameEditPart) {
+ if(childEditPart instanceof LiteralIntegerNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof LiteralIntegerFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof LiteralIntegerFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class LiteralIntegerEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(LiteralIntegerNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerFloatingLabelEditPart.java
index fe3c0f033f8..2a0530ffeaa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralInteger_2096, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralIntegerFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class LiteralIntegerFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java
index fd9f805a3ce..09c63415420 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralInteger_2096, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralIntegerNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java
index 41f9dd82924..19d90ab50fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.LiteralNullItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LiteralNullItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case LiteralNullFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralNullNameEditPart) {
- ((LiteralNullNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof LiteralNullNameEditPart) {
+ ((LiteralNullNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralNullNameEditPart) {
+ if(childEditPart instanceof LiteralNullNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof LiteralNullFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof LiteralNullFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class LiteralNullEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(LiteralNullNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullFloatingLabelEditPart.java
index bcd84930e60..615b81ebe33 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralNull_2097, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralNullFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class LiteralNullFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java
index 57955df40f6..52e9174196d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralNull_2097, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralNullNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java
index fc5d6f5d5a9..e9afae1e795 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.LiteralStringItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LiteralStringItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case LiteralStringFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralStringNameEditPart) {
- ((LiteralStringNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof LiteralStringNameEditPart) {
+ ((LiteralStringNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralStringNameEditPart) {
+ if(childEditPart instanceof LiteralStringNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof LiteralStringFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof LiteralStringFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class LiteralStringEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(LiteralStringNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringFloatingLabelEditPart.java
index 32c66f2a180..1f99c4c8f29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralString_2098, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralStringFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class LiteralStringFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java
index fbf4f4be616..bc62dfd7176 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralString_2098, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralStringNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java
index 6caf9e1511c..31f61f18025 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.LiteralUnlimitedNaturalItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LiteralUnlimitedNaturalItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralUnlimitedNaturalNameEditPart) {
- ((LiteralUnlimitedNaturalNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof LiteralUnlimitedNaturalNameEditPart) {
+ ((LiteralUnlimitedNaturalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LiteralUnlimitedNaturalNameEditPart) {
+ if(childEditPart instanceof LiteralUnlimitedNaturalNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof LiteralUnlimitedNaturalFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof LiteralUnlimitedNaturalFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class LiteralUnlimitedNaturalEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(LiteralUnlimitedNaturalNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalFloatingLabelEditPart.java
index 1875fe2414a..c1e8dc728f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralUnlimitedNatural_2099, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class LiteralUnlimitedNaturalFloatingLabelEditPart extends FloatingLabelE
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java
index 42ad4885d15..448dd7fd6d8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.LiteralUnlimitedNatural_2099, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.LiteralUnlimitedNaturalNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java
index 331e660a3a4..a550cd262e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationEditPart.java
index 583776655ac..d5544171fbe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.AppliedStereotypeManifestationLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ManifestationItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ManifestationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ManifestationNameEditPart) {
- ((ManifestationNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ManifestationNameEditPart) {
+ ((ManifestationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
- ((ManifestationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
+ ((ManifestationAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ManifestationNameEditPart) {
+ if(childEditPart instanceof ManifestationNameEditPart) {
return true;
}
- if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
+ if(childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
/**
* 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();
}
@@ -115,8 +109,7 @@ public class ManifestationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
+ return (DashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java
index a084683eb13..f1a3c1f81d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java
index 7f54c652831..82d7eb9cf9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7072;
-
- /**
- * @generated
- */
- public NodeCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.NodeCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7072;
+
+ /**
+ * @generated
+ */
+ public NodeCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.NodeCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java
index b14e7051cbd..5a7c74b08b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7059;
-
- /**
- * @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(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7059;
+
+ /**
+ * @generated
+ */
+ public NodeCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.NodeCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java
index 7d85b2a9959..1ad75271d65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.NodeCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case NodeCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 NodeCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure
- *
* @generated
*/
- @Override
public NodeCompositeFigure getPrimaryShape() {
- return (NodeCompositeFigure) primaryShape;
+ return (NodeCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeCompositeNameEditPart) {
- ((NodeCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof NodeCompositeNameEditPart) {
+ ((NodeCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((NodeCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeCompositeNameEditPart) {
+ if(childEditPart instanceof NodeCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
+ if(childEditPart instanceof NodeCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((NodeCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((NodeCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof NodeCompositeCompartmentEditPart) {
+ if(editPart instanceof NodeCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof NodeCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof NodeCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class NodeCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java
index c605b7b88ef..7253dd01bc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,17 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.NodeCompositeItemSemanticEditPolicycN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -90,17 +91,16 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeItemSemanticEditPolicycN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new StructuredClassifierLayoutEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
@@ -119,24 +119,23 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case NodeCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -156,74 +155,61 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 NodeCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.NodeCompositeFigure
- *
* @generated
*/
- @Override
public NodeCompositeFigure getPrimaryShape() {
- return (NodeCompositeFigure) primaryShape;
+ return (NodeCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeCompositeNameEditPartCN) {
- ((NodeCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof NodeCompositeNameEditPartCN) {
+ ((NodeCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
+ 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());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((NodeCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -231,16 +217,16 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeCompositeNameEditPartCN) {
+ if(childEditPart instanceof NodeCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((NodeCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((NodeCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -249,9 +235,8 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -260,9 +245,8 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -271,12 +255,11 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof NodeCompositeCompartmentEditPartCN) {
+ if(editPart instanceof NodeCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -285,21 +268,15 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof NodeCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof NodeCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -307,29 +284,24 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -340,9 +312,8 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -351,9 +322,8 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -361,7 +331,6 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -369,17 +338,15 @@ public class NodeCompositeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPart.java
index 1ac4a928684..80e73aa4fe1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Node_2072, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.NodeCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class NodeCompositeFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPartCN.java
index 00b39c94d3e..4cf0f2e2f5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Node_3084, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.NodeCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class NodeCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java
index 09228f47048..bb8154abfd7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Node_2072, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.NodeCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java
index 309b3e82698..55963748586 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Node_3084, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.NodeCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java
index 0aa3cb66520..e955f8a7320 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7068;
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.OpaqueBehaviorCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class OpaqueBehaviorCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7068;
+
+ /**
+ * @generated
+ */
+ public OpaqueBehaviorCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.OpaqueBehaviorCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java
index fbda274a169..ef16ed4961e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7055;
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.OpaqueBehaviorCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class OpaqueBehaviorCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7055;
+
+ /**
+ * @generated
+ */
+ public OpaqueBehaviorCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.OpaqueBehaviorCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java
index 56a17850658..02fa8837cc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.OpaqueBehaviorCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueBehaviorCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 OpaqueBehaviorCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure
- *
* @generated
*/
- @Override
public OpaqueBehaviorCompositeFigure getPrimaryShape() {
- return (OpaqueBehaviorCompositeFigure) primaryShape;
+ return (OpaqueBehaviorCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueBehaviorCompositeNameEditPart) {
- ((OpaqueBehaviorCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof OpaqueBehaviorCompositeNameEditPart) {
+ ((OpaqueBehaviorCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((OpaqueBehaviorCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((OpaqueBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueBehaviorCompositeNameEditPart) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((OpaqueBehaviorCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((OpaqueBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
+ if(editPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof OpaqueBehaviorCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof OpaqueBehaviorCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class OpaqueBehaviorCompositeEditPart extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java
index 7dda7f053fd..8cf2b700732 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.OpaqueBehaviorCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueBehaviorCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 OpaqueBehaviorCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.OpaqueBehaviorCompositeFigure
- *
* @generated
*/
- @Override
public OpaqueBehaviorCompositeFigure getPrimaryShape() {
- return (OpaqueBehaviorCompositeFigure) primaryShape;
+ return (OpaqueBehaviorCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueBehaviorCompositeNameEditPartCN) {
- ((OpaqueBehaviorCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof OpaqueBehaviorCompositeNameEditPartCN) {
+ ((OpaqueBehaviorCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((OpaqueBehaviorCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((OpaqueBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueBehaviorCompositeNameEditPartCN) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((OpaqueBehaviorCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((OpaqueBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
+ if(editPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof OpaqueBehaviorCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof OpaqueBehaviorCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class OpaqueBehaviorCompositeEditPartCN extends RoundedCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPart.java
index 932e2f7befe..dfcecd22ccf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueBehavior_2065, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPart extends FloatingLabelE
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPartCN.java
index d1460d85aa6..3936999ad37 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueBehavior_3077, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class OpaqueBehaviorCompositeFloatingLabelEditPartCN extends FloatingLabe
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java
index 0b1344d74b7..7a56e51fc38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueBehavior_2065, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueBehaviorCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java
index c9fff882f9c..4cce76ac3ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueBehavior_3077, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java
index 4d6adf25890..8139a95121d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.OpaqueExpressionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueExpressionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case OpaqueExpressionFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueExpressionNameEditPart) {
- ((OpaqueExpressionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof OpaqueExpressionNameEditPart) {
+ ((OpaqueExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueExpressionNameEditPart) {
+ if(childEditPart instanceof OpaqueExpressionNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof OpaqueExpressionFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof OpaqueExpressionFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class OpaqueExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueExpressionNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionFloatingLabelEditPart.java
index d080c008861..a262ccf271f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueExpression_2101, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueExpressionFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class OpaqueExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java
index 886bdcc4dbe..27ebba2c963 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.OpaqueExpression_2101, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OpaqueExpressionNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java
index 514da82fe40..c24328c01c8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -67,13 +67,13 @@ 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.editpolicies.DefaultSemanticEditPolicy;
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.composite.edit.policies.OperationItemSemanticEditPolicyCLN;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
@@ -122,14 +122,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -144,9 +142,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public DragTracker getDragTracker(Request request) {
- if (request instanceof SelectionRequest && ((SelectionRequest) request).getLastButtonPressed() == 3) {
+ if(request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3) {
return null;
}
return new DragEditPartsTrackerEx(this);
@@ -155,10 +152,9 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OperationItemSemanticEditPolicyCLN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -168,12 +164,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -181,12 +177,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -194,12 +190,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -207,20 +203,19 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -231,7 +226,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -239,7 +233,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -247,7 +240,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -264,12 +256,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -282,12 +274,10 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -296,30 +286,26 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -332,31 +318,27 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -366,9 +348,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -377,7 +358,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -385,9 +365,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Operation_3102, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.OperationEditPartCLN.VISUAL_ID));
}
return parser;
@@ -397,10 +376,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -429,8 +406,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -438,8 +415,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -448,56 +425,47 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -519,15 +487,14 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -541,7 +508,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -556,27 +522,26 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -584,18 +549,15 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -604,27 +566,19 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -632,7 +586,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -640,13 +593,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -656,10 +608,9 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -670,9 +621,8 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -693,31 +643,30 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -725,7 +674,7 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -735,13 +684,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -751,25 +699,20 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -779,13 +722,12 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -801,7 +743,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -810,7 +751,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -819,41 +759,36 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
- if (UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
+ if(UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
refreshUnderline();
}
super.handleNotificationEvent(event);
@@ -862,7 +797,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java
index 360a5dd0d55..b25be49ec8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -143,7 +141,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -155,12 +152,11 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -168,12 +164,11 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @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();
+ 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));
}
@@ -181,12 +176,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -194,12 +189,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -207,12 +202,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -220,20 +215,19 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -244,7 +238,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -252,7 +245,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -284,12 +276,10 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -298,30 +288,26 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -334,31 +320,27 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -368,9 +350,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -379,7 +360,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -387,9 +367,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Parameter_3088, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ParameterAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -399,10 +378,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -431,8 +408,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -440,8 +417,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -450,56 +427,47 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -521,15 +489,14 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -543,7 +510,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -558,27 +524,26 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -586,18 +551,15 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -606,27 +568,19 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -634,7 +588,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -642,13 +595,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -658,10 +610,9 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -672,9 +623,8 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -695,7 +645,7 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -706,12 +656,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -719,7 +669,7 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -729,13 +679,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -745,25 +694,20 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -773,13 +717,12 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -795,31 +738,26 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -832,7 +770,6 @@ public class ParameterAppliedStereotypeEditPart extends PapyrusLabelEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java
index 7ea575490b7..edd7815adf5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -34,6 +34,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -44,11 +46,8 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPoli
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomParameterItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.ParameterLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ParameterFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ParameterItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -82,14 +81,12 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ParameterItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParameterItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new ParameterLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -107,23 +104,22 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ParameterNameEditPart.VISUAL_ID:
case ParameterAppliedStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -143,27 +139,24 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ List<?> modelChildren = ((View)getModel()).getChildren();
+ if(!(notifier instanceof Edge)) {
+ if(modelChildren.contains(event.getNotifier())) {
return;
}
}
}
super.handleNotificationEvent(event);
-
}
/**
@@ -175,34 +168,27 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ParameterFigure
- *
* @generated
*/
- @Override
public ParameterFigure getPrimaryShape() {
- return (ParameterFigure) primaryShape;
+ return (ParameterFigure)primaryShape;
}
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ParameterNameEditPart) {
+ if(borderItemEditPart instanceof ParameterNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof ParameterAppliedStereotypeEditPart) {
+ } else if(borderItemEditPart instanceof ParameterAppliedStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
@@ -210,13 +196,12 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* 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());
@@ -224,15 +209,12 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
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
+ * @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
@@ -242,9 +224,8 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -253,9 +234,8 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -263,7 +243,6 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -271,17 +250,15 @@ public class ParameterEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ParameterNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java
index e031e31f59b..79caf14478b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -143,7 +141,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -155,12 +152,11 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -168,12 +164,11 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @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();
+ 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));
}
@@ -181,12 +176,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -194,12 +189,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -207,12 +202,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -220,20 +215,19 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -244,7 +238,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -252,7 +245,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -276,12 +268,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -294,12 +286,10 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -308,30 +298,26 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -344,31 +330,27 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -378,9 +360,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -389,7 +370,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -397,9 +377,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Parameter_3088, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ParameterNameEditPart.VISUAL_ID));
}
return parser;
@@ -409,10 +388,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -441,8 +418,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -450,8 +427,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -460,56 +437,47 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -531,15 +499,14 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -553,7 +520,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -568,27 +534,26 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -596,18 +561,15 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -616,27 +578,19 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -644,7 +598,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -652,13 +605,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -668,10 +620,9 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -682,9 +633,8 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -705,31 +655,30 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -737,7 +686,7 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -747,13 +696,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -763,25 +711,20 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -791,13 +734,12 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -813,31 +755,26 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -850,7 +787,6 @@ public class ParameterNameEditPart extends FloatingLabelEditPart implements ITex
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java
index 2deb75076a6..19233441687 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -143,7 +141,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -155,12 +152,11 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -168,12 +164,11 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @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();
+ 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));
}
@@ -181,12 +176,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -194,12 +189,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -207,12 +202,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -220,20 +215,19 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -244,7 +238,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -252,7 +245,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -284,12 +276,10 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -298,30 +288,26 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -334,31 +320,27 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -368,9 +350,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -379,7 +360,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -387,9 +367,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Port_3069, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -399,10 +378,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -431,8 +408,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -440,8 +417,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -450,56 +427,47 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -521,15 +489,14 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -543,7 +510,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -558,27 +524,26 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -586,18 +551,15 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -606,27 +568,19 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -634,7 +588,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -642,13 +595,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -658,10 +610,9 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -672,9 +623,8 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -695,7 +645,7 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -706,12 +656,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -719,7 +669,7 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -729,13 +679,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -745,25 +694,20 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -773,13 +717,12 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -795,31 +738,26 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -832,7 +770,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java
index 3c535928dd0..14a7393ffb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -34,6 +34,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
@@ -47,11 +49,8 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomPortItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.PortFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.PortItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -85,14 +84,12 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PortItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPortItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new PortLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -112,23 +109,22 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case PortNameEditPart.VISUAL_ID:
case PortAppliedStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -148,27 +144,24 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ List<?> modelChildren = ((View)getModel()).getChildren();
+ if(!(notifier instanceof Edge)) {
+ if(modelChildren.contains(event.getNotifier())) {
return;
}
}
}
super.handleNotificationEvent(event);
-
}
/**
@@ -180,34 +173,27 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.PortFigure
- *
* @generated
*/
- @Override
public PortFigure getPrimaryShape() {
- return (PortFigure) primaryShape;
+ return (PortFigure)primaryShape;
}
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PortNameEditPart) {
+ if(borderItemEditPart instanceof PortNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PortAppliedStereotypeEditPart) {
+ } else if(borderItemEditPart instanceof PortAppliedStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
@@ -215,13 +201,12 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* 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());
@@ -229,15 +214,12 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
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
+ * @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
@@ -247,9 +229,8 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -258,9 +239,8 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -268,7 +248,6 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -276,17 +255,15 @@ public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java
index 054bc09038e..f2795dbf5ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -117,14 +117,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -145,7 +143,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -158,12 +155,11 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -171,12 +167,11 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @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();
+ 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));
}
@@ -184,12 +179,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -197,12 +192,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -210,12 +205,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -223,20 +218,19 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -247,7 +241,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -255,7 +248,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -279,12 +271,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -297,12 +289,10 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -311,30 +301,26 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -347,31 +333,27 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -381,9 +363,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -392,7 +373,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -400,9 +380,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Port_3069, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortNameEditPart.VISUAL_ID));
}
return parser;
@@ -412,10 +391,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -444,8 +421,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -453,8 +430,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -463,56 +440,47 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -534,15 +502,14 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -556,7 +523,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -571,27 +537,26 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -599,18 +564,15 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -619,27 +581,19 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -647,7 +601,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -655,13 +608,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -671,10 +623,9 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -685,9 +636,8 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -708,31 +658,30 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -740,7 +689,7 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -750,13 +699,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -766,25 +714,20 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -794,13 +737,12 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -816,31 +758,26 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -853,7 +790,6 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -866,4 +802,4 @@ public class PortNameEditPart extends FloatingLabelEditPart implements ITextAwar
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-} \ No newline at end of file
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java
index d6bbc6fcb08..bea9aa25652 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -47,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierCon
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.papyrus.uml.diagram.composite.edit.policies.PrimitiveTypeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,10 +82,10 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PrimitiveTypeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -103,22 +104,21 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case PrimitiveTypeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +138,49 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 PrimitiveTypeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure
- *
* @generated
*/
- @Override
public PrimitiveTypeFigure getPrimaryShape() {
- return (PrimitiveTypeFigure) primaryShape;
+ return (PrimitiveTypeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PrimitiveTypeNameEditPart) {
- ((PrimitiveTypeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof PrimitiveTypeNameEditPart) {
+ ((PrimitiveTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +188,7 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PrimitiveTypeNameEditPart) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPart) {
return true;
}
return false;
@@ -205,9 +197,8 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +207,8 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +217,8 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +227,15 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PrimitiveTypeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof PrimitiveTypeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +243,24 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +271,8 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +281,8 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +290,6 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +297,15 @@ public class PrimitiveTypeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java
index 0f074116f98..910df2928ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -47,7 +49,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierCon
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.papyrus.uml.diagram.composite.edit.policies.PrimitiveTypeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -81,10 +82,10 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PrimitiveTypeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -103,22 +104,21 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,57 +138,49 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 PrimitiveTypeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure
- *
* @generated
*/
- @Override
public PrimitiveTypeFigure getPrimaryShape() {
- return (PrimitiveTypeFigure) primaryShape;
+ return (PrimitiveTypeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PrimitiveTypeNameEditPartCN) {
- ((PrimitiveTypeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof PrimitiveTypeNameEditPartCN) {
+ ((PrimitiveTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -196,7 +188,7 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PrimitiveTypeNameEditPartCN) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPartCN) {
return true;
}
return false;
@@ -205,9 +197,8 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -216,9 +207,8 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -227,9 +217,8 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -238,21 +227,15 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PrimitiveTypeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof PrimitiveTypeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -260,29 +243,24 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -293,9 +271,8 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -304,9 +281,8 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -314,7 +290,6 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -322,17 +297,15 @@ public class PrimitiveTypeEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPart.java
index 782ac3f1eb4..48103258b5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_2066, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PrimitiveTypeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class PrimitiveTypeFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPartCN.java
index 8d5e2f38c3a..13bd772a68d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_3078, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class PrimitiveTypeFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java
index bb638bc6510..4d40bb19002 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_2066, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PrimitiveTypeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java
index 6d4dec4cffb..77b2d7bd21d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_3078, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PrimitiveTypeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java
index 68c77a46258..c37dbfdc968 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -67,13 +67,13 @@ 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.editpolicies.DefaultSemanticEditPolicy;
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.composite.edit.policies.PropertyItemSemanticEditPolicyCLN;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
@@ -122,14 +122,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -144,9 +142,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public DragTracker getDragTracker(Request request) {
- if (request instanceof SelectionRequest && ((SelectionRequest) request).getLastButtonPressed() == 3) {
+ if(request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3) {
return null;
}
return new DragEditPartsTrackerEx(this);
@@ -155,10 +152,9 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyItemSemanticEditPolicyCLN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -168,12 +164,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -181,12 +177,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -194,12 +190,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -207,20 +203,19 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -231,7 +226,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -239,7 +233,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -247,7 +240,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -264,12 +256,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -282,12 +274,10 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -296,30 +286,26 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -332,31 +318,27 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -366,9 +348,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -377,7 +358,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -385,9 +365,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Property_3101, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyEditPartCLN.VISUAL_ID));
}
return parser;
@@ -397,10 +376,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -429,8 +406,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -438,8 +415,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -448,56 +425,47 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -519,15 +487,14 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -541,7 +508,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -556,27 +522,26 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -584,18 +549,15 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -604,27 +566,19 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -632,7 +586,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -640,13 +593,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -656,10 +608,9 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -670,9 +621,8 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -693,31 +643,30 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -725,7 +674,7 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -735,13 +684,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -751,25 +699,20 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -779,13 +722,12 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -801,7 +743,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -810,7 +751,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -819,41 +759,36 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
- if (UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
+ if(UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature)) {
refreshUnderline();
}
super.handleNotificationEvent(event);
@@ -862,7 +797,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java
index e522f5da77d..5749bc794bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java
@@ -1,142 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomPropertyPartCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.PropertyPartCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class PropertyPartCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7077;
-
- /**
- * @generated
- */
- public PropertyPartCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.PropertyPartCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyPartCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPropertyPartCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class PropertyPartCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7077;
+
+ /**
+ * @generated
+ */
+ public PropertyPartCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.PropertyPartCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java
index e278b04af2d..fd159df8109 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
@@ -48,19 +51,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabe
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.MaskManagedNodeEditPolicy;
-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.editpolicies.ShowHideRelatedContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomPropertyPartItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PropertyLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.PropertyPartFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.PropertyPartItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -94,15 +93,13 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyPartItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPropertyPartItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -126,24 +123,23 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case PropertyPartFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -163,74 +159,61 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 PropertyPartFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.PropertyPartFigure
- *
* @generated
*/
- @Override
public PropertyPartFigure getPrimaryShape() {
- return (PropertyPartFigure) primaryShape;
+ return (PropertyPartFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PropertyPartNameEditPartCN) {
- ((PropertyPartNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof PropertyPartNameEditPartCN) {
+ ((PropertyPartNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof PropertyPartCompartmentEditPartCN) {
+ if(childEditPart instanceof PropertyPartCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((PropertyPartCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((PropertyPartCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -238,16 +221,16 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PropertyPartNameEditPartCN) {
+ if(childEditPart instanceof PropertyPartNameEditPartCN) {
return true;
}
- if (childEditPart instanceof PropertyPartCompartmentEditPartCN) {
+ if(childEditPart instanceof PropertyPartCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((PropertyPartCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((PropertyPartCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -256,9 +239,8 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -267,9 +249,8 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -278,12 +259,11 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof PropertyPartCompartmentEditPartCN) {
+ if(editPart instanceof PropertyPartCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -292,21 +272,15 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PropertyPartFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof PropertyPartFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -314,29 +288,24 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -347,9 +316,8 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -358,9 +326,8 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -368,7 +335,6 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -376,17 +342,15 @@ public class PropertyPartEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PropertyPartNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartFloatingLabelEditPartCN.java
index 56c58c826e4..34b2a36316c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Property_3070, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class PropertyPartFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java
index 48fccdccda3..5463ff4eb5f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -137,7 +135,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -150,12 +147,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -163,12 +160,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -176,12 +173,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -189,20 +186,19 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -213,7 +209,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -221,7 +216,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -229,7 +223,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -246,12 +239,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -264,12 +257,10 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -278,30 +269,26 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -314,31 +301,27 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -348,9 +331,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -359,7 +341,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -367,9 +348,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Property_3070, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -379,10 +359,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -411,8 +389,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -420,8 +398,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -430,56 +408,47 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -501,15 +470,14 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -523,7 +491,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -538,27 +505,26 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -566,18 +532,15 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -586,27 +549,19 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -614,7 +569,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -622,13 +576,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -638,10 +591,9 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -652,9 +604,8 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -675,31 +626,30 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -707,7 +657,7 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -717,13 +667,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -733,25 +682,20 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -761,13 +705,12 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -783,7 +726,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -792,7 +734,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -801,39 +742,34 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -842,7 +778,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -856,7 +791,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -866,18 +800,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -885,6 +816,5 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java
index b886c7e06ef..c2dcf23b175 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7065;
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ProtocolStateMachineCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ProtocolStateMachineCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7065;
+
+ /**
+ * @generated
+ */
+ public ProtocolStateMachineCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ProtocolStateMachineCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java
index 89ee5a2769e..e61a526b954 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7052;
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ProtocolStateMachineCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class ProtocolStateMachineCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7052;
+
+ /**
+ * @generated
+ */
+ public ProtocolStateMachineCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ProtocolStateMachineCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java
index 035478d66cb..c11c6fb3b63 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ProtocolStateMachineCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProtocolStateMachineCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ProtocolStateMachineCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure
- *
* @generated
*/
- @Override
public ProtocolStateMachineCompositeFigure getPrimaryShape() {
- return (ProtocolStateMachineCompositeFigure) primaryShape;
+ return (ProtocolStateMachineCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ProtocolStateMachineCompositeNameEditPart) {
- ((ProtocolStateMachineCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ProtocolStateMachineCompositeNameEditPart) {
+ ((ProtocolStateMachineCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ProtocolStateMachineCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ProtocolStateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ProtocolStateMachineCompositeNameEditPart) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ProtocolStateMachineCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((ProtocolStateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
+ if(editPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ProtocolStateMachineCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof ProtocolStateMachineCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class ProtocolStateMachineCompositeEditPart extends RoundedCompartmentEdi
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java
index 980f2f4630d..d5408245aa0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.ProtocolStateMachineCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProtocolStateMachineCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 ProtocolStateMachineCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.ProtocolStateMachineCompositeFigure
- *
* @generated
*/
- @Override
public ProtocolStateMachineCompositeFigure getPrimaryShape() {
- return (ProtocolStateMachineCompositeFigure) primaryShape;
+ return (ProtocolStateMachineCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ProtocolStateMachineCompositeNameEditPartCN) {
- ((ProtocolStateMachineCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof ProtocolStateMachineCompositeNameEditPartCN) {
+ ((ProtocolStateMachineCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ProtocolStateMachineCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ProtocolStateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ProtocolStateMachineCompositeNameEditPartCN) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ProtocolStateMachineCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((ProtocolStateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
+ if(editPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ProtocolStateMachineCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof ProtocolStateMachineCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class ProtocolStateMachineCompositeEditPartCN extends RoundedCompartmentE
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPart.java
index 91bf7acf63f..7c4f2a660db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ProtocolStateMachineCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ProtocolStateMachineCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ProtocolStateMachine_2062, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPart extends Floating
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPartCN.java
index a08e62330b3..5a37b319497 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ProtocolStateMachine_3074, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class ProtocolStateMachineCompositeFloatingLabelEditPartCN extends Floati
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java
index 86dfbebcd4b..d308a227790 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ProtocolStateMachine_2062, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ProtocolStateMachineCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java
index c5a4ac5d422..ba2a680a928 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.ProtocolStateMachine_3074, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java
index 59dd45d7474..4d03e34b9f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationEditPart.java
index 5e6588a9349..aa78cd42d51 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.figure.edge.InterfaceRealizationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.RealizationItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +41,21 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new RealizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RealizationNameEditPart) {
- ((RealizationNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof RealizationNameEditPart) {
+ ((RealizationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof RealizationAppliedStereotypeEditPart) {
- ((RealizationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof RealizationAppliedStereotypeEditPart) {
+ ((RealizationAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +63,8 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +74,10 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RealizationNameEditPart) {
+ if(childEditPart instanceof RealizationNameEditPart) {
return true;
}
- if (childEditPart instanceof RealizationAppliedStereotypeEditPart) {
+ if(childEditPart instanceof RealizationAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +86,8 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +95,12 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
/**
* 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 InterfaceRealizationFigure();
}
@@ -115,8 +108,7 @@ public class RealizationEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
public InterfaceRealizationFigure getPrimaryShape() {
- return (InterfaceRealizationFigure) getFigure();
+ return (InterfaceRealizationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java
index 4de8b2658cc..9f544526a18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationEditPart.java
index e321f572bdd..18df6ec07e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,9 +16,9 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.RepresentationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.RepresentationItemSemanticEditPolicy;
/**
* @generated
@@ -40,19 +40,17 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new RepresentationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RepresentationTagLabelEditPart) {
- ((RepresentationTagLabelEditPart) childEditPart).setLabel(
- getPrimaryShape().getTagLabel());
+ if(childEditPart instanceof RepresentationTagLabelEditPart) {
+ ((RepresentationTagLabelEditPart)childEditPart).setLabel(getPrimaryShape().getTagLabel());
}
return false;
}
@@ -60,9 +58,8 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -72,7 +69,7 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RepresentationTagLabelEditPart) {
+ if(childEditPart instanceof RepresentationTagLabelEditPart) {
return true;
}
return false;
@@ -81,9 +78,8 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -91,13 +87,12 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
/**
* 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 RepresentationFigure();
}
@@ -105,8 +100,7 @@ public class RepresentationEditPart extends UMLConnectionNodeEditPart implements
/**
* @generated
*/
- @Override
public RepresentationFigure getPrimaryShape() {
- return (RepresentationFigure) getFigure();
+ return (RepresentationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java
index c37a7185782..119b153fa91 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -250,7 +241,7 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
*/
protected EObject getParserElement() {
EObject element = resolveSemanticElement();
- return element != null ? element : (View) getModel();
+ return element != null ? element : (View)getModel();
}
/**
@@ -266,12 +257,10 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -280,30 +269,26 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -316,31 +301,27 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -350,9 +331,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -361,7 +341,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -369,9 +348,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.InformationItemRepresented_4020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationTagLabelEditPart.VISUAL_ID));
}
return parser;
@@ -381,10 +359,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -413,8 +389,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -422,8 +398,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -432,56 +408,47 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -503,15 +470,14 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -525,7 +491,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -540,20 +505,20 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -561,18 +526,15 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -581,27 +543,19 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -609,7 +563,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -617,13 +570,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -633,10 +585,9 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -647,9 +598,8 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -670,31 +620,30 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -702,7 +651,7 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -712,13 +661,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -728,25 +676,20 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -756,13 +699,12 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -778,45 +720,38 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java
index c35980a3775..84fbed62809 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingEditPart.java
index af18eccd67e..5178360c170 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,10 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.composite.custom.figures.RoleBindingFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.RoleBindingItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +41,21 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new RoleBindingItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RoleBindingRoleNameEditPart) {
- ((RoleBindingRoleNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getRoleLabel());
+ if(childEditPart instanceof RoleBindingRoleNameEditPart) {
+ ((RoleBindingRoleNameEditPart)childEditPart).setLabel(getPrimaryShape().getRoleLabel());
}
- if (childEditPart instanceof RoleBindingAppliedStereotypeEditPart) {
- ((RoleBindingAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof RoleBindingAppliedStereotypeEditPart) {
+ ((RoleBindingAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +63,8 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +74,10 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof RoleBindingRoleNameEditPart) {
+ if(childEditPart instanceof RoleBindingRoleNameEditPart) {
return true;
}
- if (childEditPart instanceof RoleBindingAppliedStereotypeEditPart) {
+ if(childEditPart instanceof RoleBindingAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +86,8 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +95,12 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
/**
* 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 RoleBindingFigure();
}
@@ -115,8 +108,7 @@ public class RoleBindingEditPart extends UMLConnectionNodeEditPart implements IT
/**
* @generated
*/
- @Override
public RoleBindingFigure getPrimaryShape() {
- return (RoleBindingFigure) getFigure();
+ return (RoleBindingFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java
index c8dd82e4d41..67ddff682ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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.SOURCE;
}
@@ -161,12 +156,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingRoleNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java
index f2b050d3031..99651a410c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
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.composite.edit.policies.SignalItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SignalItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case SignalFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 SignalFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure
- *
* @generated
*/
- @Override
public SignalFigure getPrimaryShape() {
- return (SignalFigure) primaryShape;
+ return (SignalFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalNameEditPart) {
- ((SignalNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof SignalNameEditPart) {
+ ((SignalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalNameEditPart) {
+ if(childEditPart instanceof SignalNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof SignalFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof SignalFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class SignalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(SignalNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java
index 03056c39a41..2f7f7a3cc4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
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.composite.edit.policies.SignalItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SignalItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case SignalFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 SignalFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure
- *
* @generated
*/
- @Override
public SignalFigure getPrimaryShape() {
- return (SignalFigure) primaryShape;
+ return (SignalFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalNameEditPartCN) {
- ((SignalNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof SignalNameEditPartCN) {
+ ((SignalNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalNameEditPartCN) {
+ if(childEditPart instanceof SignalNameEditPartCN) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof SignalFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof SignalFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class SignalEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(SignalNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java
index dc6e45ec246..561dc2268cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.SignalEventItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SignalEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case SignalEventFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalEventNameEditPart) {
- ((SignalEventNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof SignalEventNameEditPart) {
+ ((SignalEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SignalEventNameEditPart) {
+ if(childEditPart instanceof SignalEventNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof SignalEventFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof SignalEventFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class SignalEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(SignalEventNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventFloatingLabelEditPart.java
index a862b3c2104..b458f053f6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.SignalEvent_2083, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalEventFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class SignalEventFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java
index 9d2d63830f9..6398b440592 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.SignalEvent_2083, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalEventNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPart.java
index 4d6c11cc5c2..d1ab2ab679b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class SignalFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Signal_2081, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class SignalFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPartCN.java
index 0152a035d2e..bbc74b2afef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Signal_3095, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class SignalFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java
index e7a99e9b136..539c2321567 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Signal_2081, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java
index cbcce786eed..e802ff522a8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Signal_3095, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SignalNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ 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()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java
index f7dc7f1ca9d..f3065586c6f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.StateMachineCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7066;
-
- /**
- * @generated
- */
- public StateMachineCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.StateMachineCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateMachineCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class StateMachineCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7066;
+
+ /**
+ * @generated
+ */
+ public StateMachineCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.StateMachineCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java
index b62c81c75d6..a778e5140fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java
@@ -1,140 +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.composite.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.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.StateMachineCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7053;
-
- /**
- * @generated
- */
- public StateMachineCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.StateMachineCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateMachineCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
- 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();
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.composite.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.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.PortInCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.Messages;
+
+/**
+ * @generated
+ */
+public class StateMachineCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7053;
+
+ /**
+ * @generated
+ */
+ public StateMachineCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.StateMachineCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PortInCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java
index 554a4659dad..cbb02c42048 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.StateMachineCompositeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateMachineCompositeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case StateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 StateMachineCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure
- *
* @generated
*/
- @Override
public StateMachineCompositeFigure getPrimaryShape() {
- return (StateMachineCompositeFigure) primaryShape;
+ return (StateMachineCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StateMachineCompositeNameEditPart) {
- ((StateMachineCompositeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof StateMachineCompositeNameEditPart) {
+ ((StateMachineCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof StateMachineCompositeCompartmentEditPart) {
+ if(childEditPart instanceof StateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((StateMachineCompositeCompartmentEditPart) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((StateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StateMachineCompositeNameEditPart) {
+ if(childEditPart instanceof StateMachineCompositeNameEditPart) {
return true;
}
- if (childEditPart instanceof StateMachineCompositeCompartmentEditPart) {
+ if(childEditPart instanceof StateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((StateMachineCompositeCompartmentEditPart) childEditPart).getFigure());
+ pane.remove(((StateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof StateMachineCompositeCompartmentEditPart) {
+ if(editPart instanceof StateMachineCompositeCompartmentEditPart) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof StateMachineCompositeFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof StateMachineCompositeFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class StateMachineCompositeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java
index 89ea059cba5..4002f08e183 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -37,6 +37,9 @@ 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.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,16 +49,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentE
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.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.composite.custom.edit.policies.BehaviorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.StateMachineCompositeItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -89,11 +91,11 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateMachineCompositeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -117,25 +119,24 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PortEditPart.VISUAL_ID:
case ParameterEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -155,84 +156,67 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 StateMachineCompositeFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.composite.custom.figures.StateMachineCompositeFigure
- *
* @generated
*/
- @Override
public StateMachineCompositeFigure getPrimaryShape() {
- return (StateMachineCompositeFigure) primaryShape;
+ return (StateMachineCompositeFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StateMachineCompositeNameEditPartCN) {
- ((StateMachineCompositeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof StateMachineCompositeNameEditPartCN) {
+ ((StateMachineCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
- if (childEditPart instanceof StateMachineCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof StateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((StateMachineCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((StateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof PortEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof PortEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
- // Papyrus Gencode :Affixed Port locator
- if (childEditPart instanceof ParameterEditPart) {
- IBorderItemLocator locator = new org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart) childEditPart).getFigure(), locator);
+ //Papyrus Gencode :Affixed Port locator
+ if(childEditPart instanceof ParameterEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -240,20 +224,20 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StateMachineCompositeNameEditPartCN) {
+ if(childEditPart instanceof StateMachineCompositeNameEditPartCN) {
return true;
}
- if (childEditPart instanceof StateMachineCompositeCompartmentEditPartCN) {
+ if(childEditPart instanceof StateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((StateMachineCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ pane.remove(((StateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof PortEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((PortEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof PortEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortEditPart)childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof ParameterEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart) childEditPart).getFigure());
+ if(childEditPart instanceof ParameterEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ParameterEditPart)childEditPart).getFigure());
return true;
}
return false;
@@ -262,9 +246,8 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -273,9 +256,8 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -284,12 +266,11 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof StateMachineCompositeCompartmentEditPartCN) {
+ if(editPart instanceof StateMachineCompositeCompartmentEditPartCN) {
return getPrimaryShape().getCompositeCompartmentFigure();
}
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -298,21 +279,15 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof StateMachineCompositeFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof StateMachineCompositeFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -320,29 +295,24 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -353,9 +323,8 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -364,9 +333,8 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -374,7 +342,6 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -382,17 +349,15 @@ public class StateMachineCompositeEditPartCN extends RoundedCompartmentEditPart
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPart.java
index 3c05b845eb7..bd7813074b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StateMachine_2063, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StateMachineCompositeFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class StateMachineCompositeFloatingLabelEditPart extends FloatingLabelEdi
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPartCN.java
index 036d70b4eba..f740378a496 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StateMachine_3075, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class StateMachineCompositeFloatingLabelEditPartCN extends FloatingLabelE
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java
index 0d33f03866a..1dc27b2db8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StateMachine_2063, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StateMachineCompositeNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java
index 2d570561832..271528f2049 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StateMachine_3075, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StateMachineCompositeNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java
index ce477d5ebae..0da8641bd3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.StringExpressionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StringExpressionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case StringExpressionFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StringExpressionNameEditPart) {
- ((StringExpressionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof StringExpressionNameEditPart) {
+ ((StringExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StringExpressionNameEditPart) {
+ if(childEditPart instanceof StringExpressionNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof StringExpressionFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof StringExpressionFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class StringExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(StringExpressionNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionFloatingLabelEditPart.java
index aaaee6f2e1d..e27eb63fc3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StringExpression_2100, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StringExpressionFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class StringExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java
index f1c09b50bea..2d88f840cad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.StringExpression_2100, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.StringExpressionNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
index 85ff965bf5d..6c4ac751f72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionEditPart.java
index 3b3eb5ca3ac..fa9fdc3f511 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.AppliedStereotypeSubstitutionLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.SubstitutionItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SubstitutionItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeSubstitutionLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeSubstitutionLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SubstitutionNameEditPart) {
- ((SubstitutionNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof SubstitutionNameEditPart) {
+ ((SubstitutionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof SubstitutionAppliedStereotypeEditPart) {
- ((SubstitutionAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof SubstitutionAppliedStereotypeEditPart) {
+ ((SubstitutionAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SubstitutionNameEditPart) {
+ if(childEditPart instanceof SubstitutionNameEditPart) {
return true;
}
- if (childEditPart instanceof SubstitutionAppliedStereotypeEditPart) {
+ if(childEditPart instanceof SubstitutionAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
/**
* 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 InterfaceRealizationFigure();
}
@@ -115,8 +109,7 @@ public class SubstitutionEditPart extends UMLConnectionNodeEditPart implements I
/**
* @generated
*/
- @Override
public InterfaceRealizationFigure getPrimaryShape() {
- return (InterfaceRealizationFigure) getFigure();
+ return (InterfaceRealizationFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java
index da4f5ca1020..30cf0d52233 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java
index dfa568b1e7c..d0ca6611f14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.TimeConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeConstraintNameEditPart) {
- ((TimeConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof TimeConstraintNameEditPart) {
+ ((TimeConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof TimeConstraintSpecificationEditPart) {
- ((TimeConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof TimeConstraintSpecificationEditPart) {
+ ((TimeConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeConstraintNameEditPart) {
+ if(childEditPart instanceof TimeConstraintNameEditPart) {
return true;
}
- if (childEditPart instanceof TimeConstraintSpecificationEditPart) {
+ if(childEditPart instanceof TimeConstraintSpecificationEditPart) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java
index 2c919eafdfc..5f029b52644 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,6 +25,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPa
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.composite.edit.policies.TimeConstraintItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,10 +67,10 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
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
@@ -85,7 +86,7 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -105,48 +106,40 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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;
+ return (ConstraintFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeConstraintNameEditPartCN) {
- ((TimeConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof TimeConstraintNameEditPartCN) {
+ ((TimeConstraintNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
- if (childEditPart instanceof TimeConstraintSpecificationEditPartCN) {
- ((TimeConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ if(childEditPart instanceof TimeConstraintSpecificationEditPartCN) {
+ ((TimeConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -154,10 +147,10 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeConstraintNameEditPartCN) {
+ if(childEditPart instanceof TimeConstraintNameEditPartCN) {
return true;
}
- if (childEditPart instanceof TimeConstraintSpecificationEditPartCN) {
+ if(childEditPart instanceof TimeConstraintSpecificationEditPartCN) {
return true;
}
return false;
@@ -166,9 +159,8 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -177,9 +169,8 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -188,15 +179,10 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -204,29 +190,24 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -237,9 +218,8 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -248,9 +228,8 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -258,7 +237,6 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -266,17 +244,15 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java
index 264548c5210..12c9ab6fae9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_2111, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeConstraintNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java
index ac128a3ec2a..1e444bb7807 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_3117, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeConstraintNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java
index cce51cdba5d..97798dc084f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_2111, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeConstraintSpecificationEditPart.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java
index 48e396e5bb1..228288410b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -110,14 +110,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -132,7 +130,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -144,12 +141,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -157,12 +154,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -170,12 +167,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -183,20 +180,19 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -207,7 +203,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -215,7 +210,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -223,7 +217,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -248,12 +241,10 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -262,30 +253,26 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -298,31 +285,27 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -332,9 +315,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -343,7 +325,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -351,9 +332,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_3117, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeConstraintSpecificationEditPartCN.VISUAL_ID));
}
return parser;
@@ -363,10 +343,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -395,8 +373,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -404,8 +382,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -414,56 +392,47 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -485,15 +454,14 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -507,7 +475,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -522,27 +489,26 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -550,18 +516,15 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -570,27 +533,19 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +553,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,13 +560,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -622,10 +575,9 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -636,9 +588,8 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -659,31 +610,30 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -691,7 +641,7 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,13 +651,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -717,25 +666,20 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -745,13 +689,12 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -767,7 +710,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -776,7 +718,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -785,32 +726,27 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -823,7 +759,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -837,7 +772,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -847,18 +781,15 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -866,6 +797,5 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java
index c3bfde2be82..945a0061db8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.TimeEventItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeEventItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case TimeEventFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeEventNameEditPart) {
- ((TimeEventNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof TimeEventNameEditPart) {
+ ((TimeEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeEventNameEditPart) {
+ if(childEditPart instanceof TimeEventNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeEventFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof TimeEventFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class TimeEventEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeEventNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventFloatingLabelEditPart.java
index 5ce60b15a6a..c4f6b931f62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeEvent_2089, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeEventFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class TimeEventFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java
index f293f9b45e3..49758dba712 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeEvent_2089, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeEventNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java
index cd18bcf1d7b..0965f5168e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.TimeExpressionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeExpressionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case TimeExpressionFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeExpressionNameEditPart) {
- ((TimeExpressionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof TimeExpressionNameEditPart) {
+ ((TimeExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeExpressionNameEditPart) {
+ if(childEditPart instanceof TimeExpressionNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeExpressionFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof TimeExpressionFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class TimeExpressionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeExpressionNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionFloatingLabelEditPart.java
index 798b00e68c3..cca428407b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeExpression_2102, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeExpressionFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class TimeExpressionFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java
index e9a0e9ab0dc..03f1362e494 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeExpression_2102, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeExpressionNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java
index 36d0bf00cb5..1a3eff4c846 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,7 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.TimeIntervalItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -79,10 +80,10 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeIntervalItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -99,22 +100,21 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case TimeIntervalFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -134,57 +134,49 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeIntervalNameEditPart) {
- ((TimeIntervalNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof TimeIntervalNameEditPart) {
+ ((TimeIntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -192,7 +184,7 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TimeIntervalNameEditPart) {
+ if(childEditPart instanceof TimeIntervalNameEditPart) {
return true;
}
return false;
@@ -201,9 +193,8 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -212,9 +203,8 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -223,9 +213,8 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -234,21 +223,15 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeIntervalFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof TimeIntervalFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -256,29 +239,24 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -289,9 +267,8 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -300,9 +277,8 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -310,7 +286,6 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -318,17 +293,15 @@ public class TimeIntervalEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeIntervalNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalFloatingLabelEditPart.java
index 75f22d22ace..6e598894712 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeInterval_2105, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeIntervalFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class TimeIntervalFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java
index 1ce2c5d2092..eb99b0a3ee6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeInterval_2105, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeIntervalNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java
index 804b2f65e0d..2b081295761 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,6 +33,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -46,7 +48,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.ObservationLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.TimeObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,10 +81,10 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeObservationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -102,23 +103,22 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case TimeObservationNameEditPart.VISUAL_ID:
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -138,68 +138,56 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.composite.custom.figures.TimeObservationNodeFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeObservationNameEditPart) {
+ if(borderItemEditPart instanceof TimeObservationNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof TimeObservationStereotypeLabelEditPart) {
+ } else if(borderItemEditPart instanceof TimeObservationStereotypeLabelEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
@@ -207,27 +195,22 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
}
@@ -235,9 +218,8 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -246,9 +228,8 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -256,7 +237,6 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -264,17 +244,15 @@ public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEventEditPart.java
index 8b627154ed5..7627b168ab4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEventEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEventEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,8 +16,8 @@ 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.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.TimeObservationEventSemanticEditPolicy;
/**
* @generated
@@ -39,21 +39,19 @@ public class TimeObservationEventEditPart extends ConnectionEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeObservationEventSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
}
/**
* 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 SimpleDashedEdgeFigure();
}
@@ -61,8 +59,7 @@ public class TimeObservationEventEditPart extends ConnectionEditPart implements
/**
* @generated
*/
- @Override
public SimpleDashedEdgeFigure getPrimaryShape() {
- return (SimpleDashedEdgeFigure) getFigure();
+ return (SimpleDashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java
index bb5b7c802e6..6f7154eb7d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -113,14 +113,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -141,7 +139,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -152,12 +149,11 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -165,12 +161,11 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @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();
+ 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));
}
@@ -178,12 +173,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -191,12 +186,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -204,12 +199,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -217,20 +212,19 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -241,7 +235,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -249,7 +242,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -281,12 +273,10 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -295,30 +285,26 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -331,31 +317,27 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -365,9 +347,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -376,7 +357,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -384,9 +364,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_2094, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationNameEditPart.VISUAL_ID));
}
return parser;
@@ -396,10 +375,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -428,8 +405,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -437,8 +414,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -447,56 +424,47 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -518,15 +486,14 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -540,7 +507,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -555,27 +521,26 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -583,18 +548,15 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -603,27 +565,19 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -631,7 +585,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -639,13 +592,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -655,10 +607,9 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -669,9 +620,8 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -692,31 +642,30 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -724,7 +673,7 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -734,13 +683,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -750,25 +698,20 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -778,13 +721,12 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -800,31 +742,26 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -837,7 +774,6 @@ public class TimeObservationNameEditPart extends FloatingLabelEditPart implement
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java
index 4aad0b96e44..c7230057fb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -115,14 +115,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -143,7 +141,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -155,12 +152,11 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -168,12 +164,11 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @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();
+ 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));
}
@@ -181,12 +176,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -194,12 +189,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -207,12 +202,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -220,20 +215,19 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -244,7 +238,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -252,7 +245,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -284,12 +276,10 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -298,30 +288,26 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -334,31 +320,27 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -368,9 +350,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -379,7 +360,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -387,9 +367,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_2094, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationStereotypeLabelEditPart.VISUAL_ID));
}
return parser;
@@ -399,10 +378,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -431,8 +408,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -440,8 +417,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -450,56 +427,47 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -521,15 +489,14 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -543,7 +510,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -558,27 +524,26 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -586,18 +551,15 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -606,27 +568,19 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -634,7 +588,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -642,13 +595,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -658,10 +610,9 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -672,9 +623,8 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -695,31 +645,30 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -727,7 +676,7 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -737,13 +686,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -753,25 +701,20 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -781,13 +724,12 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -803,31 +745,26 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -840,7 +777,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java
index 9304cb8c28e..01cd0d67399 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -33,1018 +33,668 @@ 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)) {
-
+ if(model instanceof View) {
+ View view = (View)model;
+ switch(UMLVisualIDRegistry.getVisualID(view)) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
return new CompositeStructureDiagramEditPart(view);
-
case ActivityCompositeEditPart.VISUAL_ID:
return new ActivityCompositeEditPart(view);
-
case ActivityCompositeNameEditPart.VISUAL_ID:
return new ActivityCompositeNameEditPart(view);
-
case ActivityCompositeFloatingLabelEditPart.VISUAL_ID:
return new ActivityCompositeFloatingLabelEditPart(view);
-
case InteractionCompositeEditPart.VISUAL_ID:
return new InteractionCompositeEditPart(view);
-
case InteractionCompositeNameEditPart.VISUAL_ID:
return new InteractionCompositeNameEditPart(view);
-
case InteractionCompositeFloatingLabelEditPart.VISUAL_ID:
return new InteractionCompositeFloatingLabelEditPart(view);
-
case ProtocolStateMachineCompositeEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeEditPart(view);
-
case ProtocolStateMachineCompositeNameEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeNameEditPart(view);
-
case ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeFloatingLabelEditPart(view);
-
case StateMachineCompositeEditPart.VISUAL_ID:
return new StateMachineCompositeEditPart(view);
-
case StateMachineCompositeNameEditPart.VISUAL_ID:
return new StateMachineCompositeNameEditPart(view);
-
case StateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return new StateMachineCompositeFloatingLabelEditPart(view);
-
case FunctionBehaviorCompositeEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeEditPart(view);
-
case FunctionBehaviorCompositeNameEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeNameEditPart(view);
-
case FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeFloatingLabelEditPart(view);
-
case OpaqueBehaviorCompositeEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeEditPart(view);
-
case OpaqueBehaviorCompositeNameEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeNameEditPart(view);
-
case OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeFloatingLabelEditPart(view);
-
case ComponentCompositeEditPart.VISUAL_ID:
return new ComponentCompositeEditPart(view);
-
case ComponentCompositeNameEditPart.VISUAL_ID:
return new ComponentCompositeNameEditPart(view);
-
case ComponentCompositeFloatingLabelEditPart.VISUAL_ID:
return new ComponentCompositeFloatingLabelEditPart(view);
-
case DeviceCompositeEditPart.VISUAL_ID:
return new DeviceCompositeEditPart(view);
-
case DeviceCompositeNameEditPart.VISUAL_ID:
return new DeviceCompositeNameEditPart(view);
-
case DeviceCompositeFloatingLabelEditPart.VISUAL_ID:
return new DeviceCompositeFloatingLabelEditPart(view);
-
case ExecutionEnvironmentCompositeEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeEditPart(view);
-
case ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeNameEditPart(view);
-
case ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeFloatingLabelEditPart(view);
-
case NodeCompositeEditPart.VISUAL_ID:
return new NodeCompositeEditPart(view);
-
case NodeCompositeNameEditPart.VISUAL_ID:
return new NodeCompositeNameEditPart(view);
-
case NodeCompositeFloatingLabelEditPart.VISUAL_ID:
return new NodeCompositeFloatingLabelEditPart(view);
-
case ClassCompositeEditPart.VISUAL_ID:
return new ClassCompositeEditPart(view);
-
case ClassCompositeNameEditPart.VISUAL_ID:
return new ClassCompositeNameEditPart(view);
-
case ClassCompositeFloatingLabelEditPart.VISUAL_ID:
return new ClassCompositeFloatingLabelEditPart(view);
-
case CollaborationCompositeEditPart.VISUAL_ID:
return new CollaborationCompositeEditPart(view);
-
case CollaborationCompositeNameEditPart.VISUAL_ID:
return new CollaborationCompositeNameEditPart(view);
-
case CollaborationCompositeFloatingLabelEditPart.VISUAL_ID:
return new CollaborationCompositeFloatingLabelEditPart(view);
-
case InterfaceEditPart.VISUAL_ID:
return new InterfaceEditPart(view);
-
case InterfaceNameEditPart.VISUAL_ID:
return new InterfaceNameEditPart(view);
-
case InterfaceFloatingLabelEditPart.VISUAL_ID:
return new InterfaceFloatingLabelEditPart(view);
-
case PrimitiveTypeEditPart.VISUAL_ID:
return new PrimitiveTypeEditPart(view);
-
case PrimitiveTypeNameEditPart.VISUAL_ID:
return new PrimitiveTypeNameEditPart(view);
-
case PrimitiveTypeFloatingLabelEditPart.VISUAL_ID:
return new PrimitiveTypeFloatingLabelEditPart(view);
-
case EnumerationEditPart.VISUAL_ID:
return new EnumerationEditPart(view);
-
case EnumerationNameEditPart.VISUAL_ID:
return new EnumerationNameEditPart(view);
-
case EnumerationFloatingLabelEditPart.VISUAL_ID:
return new EnumerationFloatingLabelEditPart(view);
-
case DataTypeEditPart.VISUAL_ID:
return new DataTypeEditPart(view);
-
case DataTypeNameEditPart.VISUAL_ID:
return new DataTypeNameEditPart(view);
-
case DataTypeFloatingLabelEditPart.VISUAL_ID:
return new DataTypeFloatingLabelEditPart(view);
-
case ActorEditPart.VISUAL_ID:
return new ActorEditPart(view);
-
case ActorNameEditPart.VISUAL_ID:
return new ActorNameEditPart(view);
-
case ActorFloatingLabelEditPart.VISUAL_ID:
return new ActorFloatingLabelEditPart(view);
-
case DeploymentSpecificationEditPart.VISUAL_ID:
return new DeploymentSpecificationEditPart(view);
-
case DeploymentSpecificationNameEditPart.VISUAL_ID:
return new DeploymentSpecificationNameEditPart(view);
-
case DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID:
return new DeploymentSpecificationFloatingLabelEditPart(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 InformationItemEditPart.VISUAL_ID:
return new InformationItemEditPart(view);
-
case InformationItemNameEditPart.VISUAL_ID:
return new InformationItemNameEditPart(view);
-
case InformationItemFloatingLabelEditPart.VISUAL_ID:
return new InformationItemFloatingLabelEditPart(view);
-
case SignalEditPart.VISUAL_ID:
return new SignalEditPart(view);
-
case SignalNameEditPart.VISUAL_ID:
return new SignalNameEditPart(view);
-
case SignalFloatingLabelEditPart.VISUAL_ID:
return new SignalFloatingLabelEditPart(view);
-
case UseCaseEditPart.VISUAL_ID:
return new UseCaseEditPart(view);
-
case UseCaseNameEditPart.VISUAL_ID:
return new UseCaseNameEditPart(view);
-
case UseCaseFloatingLabelEditPart.VISUAL_ID:
return new UseCaseFloatingLabelEditPart(view);
-
case SignalEventEditPart.VISUAL_ID:
return new SignalEventEditPart(view);
-
case SignalEventNameEditPart.VISUAL_ID:
return new SignalEventNameEditPart(view);
-
case SignalEventFloatingLabelEditPart.VISUAL_ID:
return new SignalEventFloatingLabelEditPart(view);
-
case CallEventEditPart.VISUAL_ID:
return new CallEventEditPart(view);
-
case CallEventNameEditPart.VISUAL_ID:
return new CallEventNameEditPart(view);
-
case CallEventFloatingLabelEditPart.VISUAL_ID:
return new CallEventFloatingLabelEditPart(view);
-
case AnyReceiveEventEditPart.VISUAL_ID:
return new AnyReceiveEventEditPart(view);
-
case AnyReceiveEventNameEditPart.VISUAL_ID:
return new AnyReceiveEventNameEditPart(view);
-
case AnyReceiveEventFloatingLabelEditPart.VISUAL_ID:
return new AnyReceiveEventFloatingLabelEditPart(view);
-
case ChangeEventEditPart.VISUAL_ID:
return new ChangeEventEditPart(view);
-
case ChangeEventNameEditPart.VISUAL_ID:
return new ChangeEventNameEditPart(view);
-
case ChangeEventFloatingLabelEditPart.VISUAL_ID:
return new ChangeEventFloatingLabelEditPart(view);
-
case TimeEventEditPart.VISUAL_ID:
return new TimeEventEditPart(view);
-
case TimeEventNameEditPart.VISUAL_ID:
return new TimeEventNameEditPart(view);
-
case TimeEventFloatingLabelEditPart.VISUAL_ID:
return new TimeEventFloatingLabelEditPart(view);
-
case DurationObservationEditPart.VISUAL_ID:
return new DurationObservationEditPart(view);
-
case DurationObservationNameEditPart.VISUAL_ID:
return new DurationObservationNameEditPart(view);
-
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return new DurationObservationStereotypeLabelEditPart(view);
-
case TimeObservationEditPart.VISUAL_ID:
return new TimeObservationEditPart(view);
-
case TimeObservationNameEditPart.VISUAL_ID:
return new TimeObservationNameEditPart(view);
-
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new TimeObservationStereotypeLabelEditPart(view);
-
case LiteralBooleanEditPart.VISUAL_ID:
return new LiteralBooleanEditPart(view);
-
case LiteralBooleanNameEditPart.VISUAL_ID:
return new LiteralBooleanNameEditPart(view);
-
case LiteralBooleanFloatingLabelEditPart.VISUAL_ID:
return new LiteralBooleanFloatingLabelEditPart(view);
-
case LiteralIntegerEditPart.VISUAL_ID:
return new LiteralIntegerEditPart(view);
-
case LiteralIntegerNameEditPart.VISUAL_ID:
return new LiteralIntegerNameEditPart(view);
-
case LiteralIntegerFloatingLabelEditPart.VISUAL_ID:
return new LiteralIntegerFloatingLabelEditPart(view);
-
case LiteralNullEditPart.VISUAL_ID:
return new LiteralNullEditPart(view);
-
case LiteralNullNameEditPart.VISUAL_ID:
return new LiteralNullNameEditPart(view);
-
case LiteralNullFloatingLabelEditPart.VISUAL_ID:
return new LiteralNullFloatingLabelEditPart(view);
-
case LiteralStringEditPart.VISUAL_ID:
return new LiteralStringEditPart(view);
-
case LiteralStringNameEditPart.VISUAL_ID:
return new LiteralStringNameEditPart(view);
-
case LiteralStringFloatingLabelEditPart.VISUAL_ID:
return new LiteralStringFloatingLabelEditPart(view);
-
case LiteralUnlimitedNaturalEditPart.VISUAL_ID:
return new LiteralUnlimitedNaturalEditPart(view);
-
case LiteralUnlimitedNaturalNameEditPart.VISUAL_ID:
return new LiteralUnlimitedNaturalNameEditPart(view);
-
case LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID:
return new LiteralUnlimitedNaturalFloatingLabelEditPart(view);
-
case StringExpressionEditPart.VISUAL_ID:
return new StringExpressionEditPart(view);
-
case StringExpressionNameEditPart.VISUAL_ID:
return new StringExpressionNameEditPart(view);
-
case StringExpressionFloatingLabelEditPart.VISUAL_ID:
return new StringExpressionFloatingLabelEditPart(view);
-
case OpaqueExpressionEditPart.VISUAL_ID:
return new OpaqueExpressionEditPart(view);
-
case OpaqueExpressionNameEditPart.VISUAL_ID:
return new OpaqueExpressionNameEditPart(view);
-
case OpaqueExpressionFloatingLabelEditPart.VISUAL_ID:
return new OpaqueExpressionFloatingLabelEditPart(view);
-
case TimeExpressionEditPart.VISUAL_ID:
return new TimeExpressionEditPart(view);
-
case TimeExpressionNameEditPart.VISUAL_ID:
return new TimeExpressionNameEditPart(view);
-
case TimeExpressionFloatingLabelEditPart.VISUAL_ID:
return new TimeExpressionFloatingLabelEditPart(view);
-
case ExpressionEditPart.VISUAL_ID:
return new ExpressionEditPart(view);
-
case ExpressionNameEditPart.VISUAL_ID:
return new ExpressionNameEditPart(view);
-
case ExpressionFloatingLabelEditPart.VISUAL_ID:
return new ExpressionFloatingLabelEditPart(view);
-
case DurationEditPart.VISUAL_ID:
return new DurationEditPart(view);
-
case DurationNameEditPart.VISUAL_ID:
return new DurationNameEditPart(view);
-
case DurationFloatingLabelEditPart.VISUAL_ID:
return new DurationFloatingLabelEditPart(view);
-
case TimeIntervalEditPart.VISUAL_ID:
return new TimeIntervalEditPart(view);
-
case TimeIntervalNameEditPart.VISUAL_ID:
return new TimeIntervalNameEditPart(view);
-
case TimeIntervalFloatingLabelEditPart.VISUAL_ID:
return new TimeIntervalFloatingLabelEditPart(view);
-
case DurationIntervalEditPart.VISUAL_ID:
return new DurationIntervalEditPart(view);
-
case DurationIntervalNameEditPart.VISUAL_ID:
return new DurationIntervalNameEditPart(view);
-
case DurationIntervalFloatingLabelEditPart.VISUAL_ID:
return new DurationIntervalFloatingLabelEditPart(view);
-
case IntervalEditPart.VISUAL_ID:
return new IntervalEditPart(view);
-
case IntervalNameEditPart.VISUAL_ID:
return new IntervalNameEditPart(view);
-
case IntervalFloatingLabelEditPart.VISUAL_ID:
return new IntervalFloatingLabelEditPart(view);
-
case InstanceValueEditPart.VISUAL_ID:
return new InstanceValueEditPart(view);
-
case InstanceValueNameEditPart.VISUAL_ID:
return new InstanceValueNameEditPart(view);
-
case InstanceValueFloatingLabelEditPart.VISUAL_ID:
return new InstanceValueFloatingLabelEditPart(view);
-
case CommentEditPart.VISUAL_ID:
return new CommentEditPart(view);
-
case CommentBodyEditPart.VISUAL_ID:
return new CommentBodyEditPart(view);
-
case DurationConstraintEditPart.VISUAL_ID:
return new DurationConstraintEditPart(view);
-
case DurationConstraintNameEditPart.VISUAL_ID:
return new DurationConstraintNameEditPart(view);
-
case DurationConstraintSpecificationEditPart.VISUAL_ID:
return new DurationConstraintSpecificationEditPart(view);
-
case TimeConstraintEditPart.VISUAL_ID:
return new TimeConstraintEditPart(view);
-
case TimeConstraintNameEditPart.VISUAL_ID:
return new TimeConstraintNameEditPart(view);
-
case TimeConstraintSpecificationEditPart.VISUAL_ID:
return new TimeConstraintSpecificationEditPart(view);
-
case IntervalConstraintEditPart.VISUAL_ID:
return new IntervalConstraintEditPart(view);
-
case IntervalConstraintNameEditPart.VISUAL_ID:
return new IntervalConstraintNameEditPart(view);
-
case IntervalConstraintSpecificationEditPart.VISUAL_ID:
return new IntervalConstraintSpecificationEditPart(view);
-
case InteractionConstraintEditPart.VISUAL_ID:
return new InteractionConstraintEditPart(view);
-
case InteractionConstraintNameEditPart.VISUAL_ID:
return new InteractionConstraintNameEditPart(view);
-
case InteractionConstraintSpecificationEditPart.VISUAL_ID:
return new InteractionConstraintSpecificationEditPart(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 BehaviorPortEditPart.VISUAL_ID:
return new BehaviorPortEditPart(view);
-
case BehaviorPortFloatingLabelEditPart.VISUAL_ID:
return new BehaviorPortFloatingLabelEditPart(view);
-
case PortEditPart.VISUAL_ID:
return new PortEditPart(view);
-
case PortNameEditPart.VISUAL_ID:
return new PortNameEditPart(view);
-
case PortAppliedStereotypeEditPart.VISUAL_ID:
return new PortAppliedStereotypeEditPart(view);
-
case ParameterEditPart.VISUAL_ID:
return new ParameterEditPart(view);
-
case ParameterNameEditPart.VISUAL_ID:
return new ParameterNameEditPart(view);
-
case ParameterAppliedStereotypeEditPart.VISUAL_ID:
return new ParameterAppliedStereotypeEditPart(view);
-
case PropertyPartEditPartCN.VISUAL_ID:
return new PropertyPartEditPartCN(view);
-
case PropertyPartNameEditPartCN.VISUAL_ID:
return new PropertyPartNameEditPartCN(view);
-
case PropertyPartFloatingLabelEditPartCN.VISUAL_ID:
return new PropertyPartFloatingLabelEditPartCN(view);
-
case CollaborationRoleEditPartCN.VISUAL_ID:
return new CollaborationRoleEditPartCN(view);
-
case CollaborationRoleNameEditPartCN.VISUAL_ID:
return new CollaborationRoleNameEditPartCN(view);
-
case CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID:
return new CollaborationRoleFloatingLabelEditPartCN(view);
-
case CollaborationUseEditPartCN.VISUAL_ID:
return new CollaborationUseEditPartCN(view);
-
case CollaborationUseNameEditPart.VISUAL_ID:
return new CollaborationUseNameEditPart(view);
-
case CollaborationUseFloatingLabelEditPartCN.VISUAL_ID:
return new CollaborationUseFloatingLabelEditPartCN(view);
-
case ActivityCompositeEditPartCN.VISUAL_ID:
return new ActivityCompositeEditPartCN(view);
-
case ActivityCompositeNameEditPartCN.VISUAL_ID:
return new ActivityCompositeNameEditPartCN(view);
-
case ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new ActivityCompositeFloatingLabelEditPartCN(view);
-
case InteractionCompositeEditPartCN.VISUAL_ID:
return new InteractionCompositeEditPartCN(view);
-
case InteractionCompositeNameEditPartCN.VISUAL_ID:
return new InteractionCompositeNameEditPartCN(view);
-
case InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new InteractionCompositeFloatingLabelEditPartCN(view);
-
case ProtocolStateMachineCompositeEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeEditPartCN(view);
-
case ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeNameEditPartCN(view);
-
case ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeFloatingLabelEditPartCN(view);
-
case StateMachineCompositeEditPartCN.VISUAL_ID:
return new StateMachineCompositeEditPartCN(view);
-
case StateMachineCompositeNameEditPartCN.VISUAL_ID:
return new StateMachineCompositeNameEditPartCN(view);
-
case StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new StateMachineCompositeFloatingLabelEditPartCN(view);
-
case FunctionBehaviorCompositeEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeEditPartCN(view);
-
case FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeNameEditPartCN(view);
-
case FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeFloatingLabelEditPartCN(view);
-
case OpaqueBehaviorCompositeEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeEditPartCN(view);
-
case OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeNameEditPartCN(view);
-
case OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeFloatingLabelEditPartCN(view);
-
case ComponentCompositeEditPartCN.VISUAL_ID:
return new ComponentCompositeEditPartCN(view);
-
case ComponentCompositeNameEditPartCN.VISUAL_ID:
return new ComponentCompositeNameEditPartCN(view);
-
case ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new ComponentCompositeFloatingLabelEditPartCN(view);
-
case DeviceCompositeEditPartCN.VISUAL_ID:
return new DeviceCompositeEditPartCN(view);
-
case DeviceCompositeNameEditPartCN.VISUAL_ID:
return new DeviceCompositeNameEditPartCN(view);
-
case DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new DeviceCompositeFloatingLabelEditPartCN(view);
-
case ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeEditPartCN(view);
-
case ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeNameEditPartCN(view);
-
case ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeFloatingLabelEditPartCN(view);
-
case NodeCompositeEditPartCN.VISUAL_ID:
return new NodeCompositeEditPartCN(view);
-
case NodeCompositeNameEditPartCN.VISUAL_ID:
return new NodeCompositeNameEditPartCN(view);
-
case NodeCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new NodeCompositeFloatingLabelEditPartCN(view);
-
case ClassCompositeEditPartCN.VISUAL_ID:
return new ClassCompositeEditPartCN(view);
-
case ClassCompositeNameEditPartCN.VISUAL_ID:
return new ClassCompositeNameEditPartCN(view);
-
case ClassCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new ClassCompositeFloatingLabelEditPartCN(view);
-
case CollaborationCompositeEditPartCN.VISUAL_ID:
return new CollaborationCompositeEditPartCN(view);
-
case CollaborationCompositeNameEditPartCN.VISUAL_ID:
return new CollaborationCompositeNameEditPartCN(view);
-
case CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID:
return new CollaborationCompositeFloatingLabelEditPartCN(view);
-
case InterfaceEditPartCN.VISUAL_ID:
return new InterfaceEditPartCN(view);
-
case InterfaceNameEditPartCN.VISUAL_ID:
return new InterfaceNameEditPartCN(view);
-
case InterfaceFloatingLabelEditPartCN.VISUAL_ID:
return new InterfaceFloatingLabelEditPartCN(view);
-
case PrimitiveTypeEditPartCN.VISUAL_ID:
return new PrimitiveTypeEditPartCN(view);
-
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return new PrimitiveTypeNameEditPartCN(view);
-
case PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID:
return new PrimitiveTypeFloatingLabelEditPartCN(view);
-
case EnumerationEditPartCN.VISUAL_ID:
return new EnumerationEditPartCN(view);
-
case EnumerationNameEditPartCN.VISUAL_ID:
return new EnumerationNameEditPartCN(view);
-
case EnumerationFloatingLabelEditPartCN.VISUAL_ID:
return new EnumerationFloatingLabelEditPartCN(view);
-
case DataTypeEditPartCN.VISUAL_ID:
return new DataTypeEditPartCN(view);
-
case DataTypeNameEditPartCN.VISUAL_ID:
return new DataTypeNameEditPartCN(view);
-
case DataTypeFloatingLabelEditPartCN.VISUAL_ID:
return new DataTypeFloatingLabelEditPartCN(view);
-
case ActorEditPartCN.VISUAL_ID:
return new ActorEditPartCN(view);
-
case ActorNameEditPartCN.VISUAL_ID:
return new ActorNameEditPartCN(view);
-
case ActorFloatingLabelEditPartCN.VISUAL_ID:
return new ActorFloatingLabelEditPartCN(view);
-
case DeploymentSpecificationEditPartCN.VISUAL_ID:
return new DeploymentSpecificationEditPartCN(view);
-
case DeploymentSpecificationNameEditPartCN.VISUAL_ID:
return new DeploymentSpecificationNameEditPartCN(view);
-
case DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID:
return new DeploymentSpecificationFloatingLabelEditPartCN(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 InformationItemEditPartCN.VISUAL_ID:
return new InformationItemEditPartCN(view);
-
case InformationItemNameEditPartCN.VISUAL_ID:
return new InformationItemNameEditPartCN(view);
-
case InformationItemFloatingLabelEditPartCN.VISUAL_ID:
return new InformationItemFloatingLabelEditPartCN(view);
-
case SignalEditPartCN.VISUAL_ID:
return new SignalEditPartCN(view);
-
case SignalNameEditPartCN.VISUAL_ID:
return new SignalNameEditPartCN(view);
-
case SignalFloatingLabelEditPartCN.VISUAL_ID:
return new SignalFloatingLabelEditPartCN(view);
-
case UseCaseEditPartCN.VISUAL_ID:
return new UseCaseEditPartCN(view);
-
case UseCaseNameEditPartCN.VISUAL_ID:
return new UseCaseNameEditPartCN(view);
-
case UseCaseFloatingLabelEditPartCN.VISUAL_ID:
return new UseCaseFloatingLabelEditPartCN(view);
-
case CommentEditPartCN.VISUAL_ID:
return new CommentEditPartCN(view);
-
case CommentBodyEditPartCN.VISUAL_ID:
return new CommentBodyEditPartCN(view);
-
case DurationConstraintEditPartCN.VISUAL_ID:
return new DurationConstraintEditPartCN(view);
-
case DurationConstraintNameEditPartCN.VISUAL_ID:
return new DurationConstraintNameEditPartCN(view);
-
case DurationConstraintSpecificationEditPartCN.VISUAL_ID:
return new DurationConstraintSpecificationEditPartCN(view);
-
case TimeConstraintEditPartCN.VISUAL_ID:
return new TimeConstraintEditPartCN(view);
-
case TimeConstraintNameEditPartCN.VISUAL_ID:
return new TimeConstraintNameEditPartCN(view);
-
case TimeConstraintSpecificationEditPartCN.VISUAL_ID:
return new TimeConstraintSpecificationEditPartCN(view);
-
case IntervalConstraintEditPartCN.VISUAL_ID:
return new IntervalConstraintEditPartCN(view);
-
case IntervalConstraintNameEditPartCN.VISUAL_ID:
return new IntervalConstraintNameEditPartCN(view);
-
case IntervalConstraintSpecificationEditPartCN.VISUAL_ID:
return new IntervalConstraintSpecificationEditPartCN(view);
-
case InteractionConstraintEditPartCN.VISUAL_ID:
return new InteractionConstraintEditPartCN(view);
-
case InteractionConstraintNameEditPartCN.VISUAL_ID:
return new InteractionConstraintNameEditPartCN(view);
-
case InteractionConstraintSpecificationEditPartCN.VISUAL_ID:
return new InteractionConstraintSpecificationEditPartCN(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 PropertyEditPartCLN.VISUAL_ID:
return new PropertyEditPartCLN(view);
-
case OperationEditPartCLN.VISUAL_ID:
return new OperationEditPartCLN(view);
-
case EnumerationLiteralEditPartCLN.VISUAL_ID:
return new EnumerationLiteralEditPartCLN(view);
-
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPart(view);
-
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
return new DataTypeOperationCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPartCN(view);
-
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return new DataTypeOperationCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPart(view);
-
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPartCN(view);
-
case ActivityCompositeCompartmentEditPartCN.VISUAL_ID:
return new ActivityCompositeCompartmentEditPartCN(view);
-
case InteractionCompositeCompartmentEditPartCN.VISUAL_ID:
return new InteractionCompositeCompartmentEditPartCN(view);
-
case ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeCompartmentEditPartCN(view);
-
case StateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
return new StateMachineCompositeCompartmentEditPartCN(view);
-
case FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeCompartmentEditPartCN(view);
-
case OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeCompartmentEditPartCN(view);
-
case ComponentCompositeCompartmentEditPartCN.VISUAL_ID:
return new ComponentCompositeCompartmentEditPartCN(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 ClassCompositeCompartmentEditPartCN.VISUAL_ID:
return new ClassCompositeCompartmentEditPartCN(view);
-
case CollaborationCompositeCompartmentEditPartCN.VISUAL_ID:
return new CollaborationCompositeCompartmentEditPartCN(view);
-
case ActivityCompositeCompartmentEditPart.VISUAL_ID:
return new ActivityCompositeCompartmentEditPart(view);
-
case InteractionCompositeCompartmentEditPart.VISUAL_ID:
return new InteractionCompositeCompartmentEditPart(view);
-
case ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeCompartmentEditPart(view);
-
case StateMachineCompositeCompartmentEditPart.VISUAL_ID:
return new StateMachineCompositeCompartmentEditPart(view);
-
case FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeCompartmentEditPart(view);
-
case OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeCompartmentEditPart(view);
-
case ComponentCompositeCompartmentEditPart.VISUAL_ID:
return new ComponentCompositeCompartmentEditPart(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 ClassCompositeCompartmentEditPart.VISUAL_ID:
return new ClassCompositeCompartmentEditPart(view);
-
case CollaborationCompositeCompartmentEditPart.VISUAL_ID:
return new CollaborationCompositeCompartmentEditPart(view);
-
case PropertyPartCompartmentEditPartCN.VISUAL_ID:
return new PropertyPartCompartmentEditPartCN(view);
-
case BehaviorPortLinkEditPart.VISUAL_ID:
return new BehaviorPortLinkEditPart(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 ComponentRealizationEditPart.VISUAL_ID:
return new ComponentRealizationEditPart(view);
-
case ComponentRealizationNameEditPart.VISUAL_ID:
return new ComponentRealizationNameEditPart(view);
-
case ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID:
return new ComponentRealizationAppliedStereotypeEditPart(view);
-
-
case InterfaceRealizationEditPart.VISUAL_ID:
return new InterfaceRealizationEditPart(view);
-
case InterfaceRealizationNameEditPart.VISUAL_ID:
return new InterfaceRealizationNameEditPart(view);
-
case InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID:
return new InterfaceRealizationAppliedStereotypeEditPart(view);
-
-
case SubstitutionEditPart.VISUAL_ID:
return new SubstitutionEditPart(view);
-
case SubstitutionNameEditPart.VISUAL_ID:
return new SubstitutionNameEditPart(view);
-
case SubstitutionAppliedStereotypeEditPart.VISUAL_ID:
return new SubstitutionAppliedStereotypeEditPart(view);
-
-
case RealizationEditPart.VISUAL_ID:
return new RealizationEditPart(view);
-
case RealizationNameEditPart.VISUAL_ID:
return new RealizationNameEditPart(view);
-
case RealizationAppliedStereotypeEditPart.VISUAL_ID:
return new RealizationAppliedStereotypeEditPart(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 AbstractionEditPart.VISUAL_ID:
return new AbstractionEditPart(view);
-
case AbstractionNameEditPart.VISUAL_ID:
return new AbstractionNameEditPart(view);
-
case AbstractionAppliedStereotypeEditPart.VISUAL_ID:
return new AbstractionAppliedStereotypeEditPart(view);
-
-
case UsageEditPart.VISUAL_ID:
return new UsageEditPart(view);
-
case UsageNameEditPart.VISUAL_ID:
return new UsageNameEditPart(view);
-
case UsageAppliedStereotypeEditPart.VISUAL_ID:
return new UsageAppliedStereotypeEditPart(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 RoleBindingEditPart.VISUAL_ID:
return new RoleBindingEditPart(view);
-
case RoleBindingRoleNameEditPart.VISUAL_ID:
return new RoleBindingRoleNameEditPart(view);
-
case RoleBindingAppliedStereotypeEditPart.VISUAL_ID:
return new RoleBindingAppliedStereotypeEditPart(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 ConnectorEditPart.VISUAL_ID:
return new ConnectorEditPart(view);
-
case ConnectorAppliedStereotypeEditPart.VISUAL_ID:
return new ConnectorAppliedStereotypeEditPart(view);
-
case ConnectorNameEditPart.VISUAL_ID:
return new ConnectorNameEditPart(view);
-
case ConnectorMultiplicitySourceEditPart.VISUAL_ID:
return new ConnectorMultiplicitySourceEditPart(view);
-
case ConnectorMultiplicityTargetEditPart.VISUAL_ID:
return new ConnectorMultiplicityTargetEditPart(view);
-
-
case GeneralizationEditPart.VISUAL_ID:
return new GeneralizationEditPart(view);
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return new GeneralizationAppliedStereotypeEditPart(view);
-
-
case TimeObservationEventEditPart.VISUAL_ID:
return new TimeObservationEventEditPart(view);
-
-
case DurationObservationEventEditPart.VISUAL_ID:
return new DurationObservationEventEditPart(view);
-
-
case RepresentationEditPart.VISUAL_ID:
return new RepresentationEditPart(view);
-
case RepresentationTagLabelEditPart.VISUAL_ID:
return new RepresentationTagLabelEditPart(view);
-
-
case InformationFlowEditPart.VISUAL_ID:
return new InformationFlowEditPart(view);
-
case InformationFlowConveyedLabelEditPart.VISUAL_ID:
return new InformationFlowConveyedLabelEditPart(view);
-
case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
return new InformationFlowAppliedStereotypeEditPart(view);
-
}
}
return createUnrecognizedEditPart(context, model);
@@ -1062,13 +712,10 @@ public class UMLEditPartFactory implements EditPartFactory {
* @generated
*/
public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator(
- (IMultilineEditableFigure) source.getFigure());
- }
- else {
+ if(source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator((IMultilineEditableFigure)source.getFigure());
+ } else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
}
}
@@ -1099,18 +746,16 @@ public class UMLEditPartFactory implements EditPartFactory {
/**
* @generated
*/
- @Override
public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
+ 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(getMultilineEditableFigure().getText().length() > 0) {
+ rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
}
- if (!rect.equals(new Rectangle(text.getBounds()))) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java
index c38a5337596..2750e6532a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageAppliedStereotypeEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,7 +619,7 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -680,12 +630,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -693,7 +643,7 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -703,13 +653,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -719,25 +668,20 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -747,13 +691,12 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -769,45 +712,38 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageEditPart.java
index 38d185f7f47..1355e9284ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -16,11 +16,11 @@ 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.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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.AppliedStereotypeUsageLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UsageItemSemanticEditPolicy;
/**
* @generated
@@ -42,24 +42,21 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UsageItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeUsageLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeUsageLabelDisplayEditPolicy());
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UsageNameEditPart) {
- ((UsageNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof UsageNameEditPart) {
+ ((UsageNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
}
- if (childEditPart instanceof UsageAppliedStereotypeEditPart) {
- ((UsageAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
+ if(childEditPart instanceof UsageAppliedStereotypeEditPart) {
+ ((UsageAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
@@ -67,9 +64,8 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -79,10 +75,10 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UsageNameEditPart) {
+ if(childEditPart instanceof UsageNameEditPart) {
return true;
}
- if (childEditPart instanceof UsageAppliedStereotypeEditPart) {
+ if(childEditPart instanceof UsageAppliedStereotypeEditPart) {
return true;
}
return false;
@@ -91,9 +87,8 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -101,13 +96,12 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
/**
* 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();
}
@@ -115,8 +109,7 @@ public class UsageEditPart extends UMLConnectionNodeEditPart implements ITreeBra
/**
* @generated
*/
- @Override
public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
+ return (DashedEdgeFigure)getFigure();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java
index ccf42044f8c..f973846df27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
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;
@@ -112,14 +111,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -138,21 +135,19 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@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;
}
@@ -161,12 +156,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -174,12 +169,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -187,12 +182,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -200,20 +195,19 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -224,7 +218,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -232,7 +225,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -240,7 +232,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -265,12 +256,10 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -279,30 +268,26 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -315,31 +300,27 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -349,9 +330,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -360,7 +340,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -368,9 +347,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageNameEditPart.VISUAL_ID));
}
return parser;
@@ -380,10 +358,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -412,8 +388,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -421,8 +397,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -431,56 +407,47 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -502,15 +469,14 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -524,7 +490,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -539,20 +504,20 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -560,18 +525,15 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -580,27 +542,19 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -608,7 +562,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -616,13 +569,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -632,10 +584,9 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -646,9 +597,8 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -669,31 +619,30 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -701,7 +650,7 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -711,13 +660,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -727,25 +675,20 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -755,13 +698,12 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -777,45 +719,38 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java
index de2f15ab8a8..4163b773046 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,8 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UseCaseItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,14 +80,13 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCaseItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -101,22 +100,21 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case UseCaseFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -136,57 +134,49 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UseCaseNameEditPart) {
- ((UseCaseNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof UseCaseNameEditPart) {
+ ((UseCaseNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -194,7 +184,7 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UseCaseNameEditPart) {
+ if(childEditPart instanceof UseCaseNameEditPart) {
return true;
}
return false;
@@ -203,9 +193,8 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -214,9 +203,8 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -225,9 +213,8 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -236,21 +223,15 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof UseCaseFloatingLabelEditPart) {
+ if(borderItemEditPart instanceof UseCaseFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -258,29 +239,24 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -291,9 +267,8 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -302,9 +277,8 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -312,7 +286,6 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -320,17 +293,15 @@ public class UseCaseEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(UseCaseNameEditPart.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java
index c4f62f22a87..9ec77c21ff1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,6 +35,8 @@ 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.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
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;
@@ -45,8 +47,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
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.RoundedRectangleLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UseCaseItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -80,14 +80,13 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCaseItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- 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);
@@ -101,22 +100,21 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ View childView = (View)child.getModel();
+ switch(UMLVisualIDRegistry.getVisualID(childView)) {
case UseCaseFloatingLabelEditPartCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
+ if(result == null) {
result = new NonResizableEditPolicy();
}
return result;
@@ -136,57 +134,49 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
}
/**
- * Papyrus codeGen
- *
- * @generated
+ *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())) {
+ 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())) {
+ 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 RoundedCompartmentFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
- @Override
public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
+ return (RoundedCompartmentFigure)primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UseCaseNameEditPartCN) {
- ((UseCaseNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ if(childEditPart instanceof UseCaseNameEditPartCN) {
+ ((UseCaseNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -194,7 +184,7 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof UseCaseNameEditPartCN) {
+ if(childEditPart instanceof UseCaseNameEditPartCN) {
return true;
}
return false;
@@ -203,9 +193,8 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
+ if(addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
@@ -214,9 +203,8 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
+ if(removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
@@ -225,9 +213,8 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
+ if(editPart instanceof IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
@@ -236,21 +223,15 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof UseCaseFloatingLabelEditPartCN) {
+ if(borderItemEditPart instanceof UseCaseFloatingLabelEditPartCN) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- /**
- * @generated
- */
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -258,29 +239,24 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* 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
+ * @param nodeShape instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
+ if(nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
@@ -291,9 +267,8 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
- if (contentPane != null) {
+ if(contentPane != null) {
return contentPane;
}
return super.getContentPane();
@@ -302,9 +277,8 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
+ if(primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
@@ -312,7 +286,6 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -320,17 +293,15 @@ public class UseCaseEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(UseCaseNameEditPartCN.VISUAL_ID));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPart.java
index 9bf2d31f84b..1346b487d84 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_2082, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseFloatingLabelEditPart.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class UseCaseFloatingLabelEditPart extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPartCN.java
index 001ee6978ba..4efca2bba6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseFloatingLabelEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -84,9 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -115,19 +113,15 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -145,7 +139,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -156,12 +149,11 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return (IBorderItemLocator)constraint;
}
return null;
}
@@ -169,26 +161,24 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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();
+ 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();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -196,12 +186,12 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -209,12 +199,12 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -222,20 +212,19 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -246,7 +235,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -254,7 +242,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -286,12 +273,10 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -300,30 +285,26 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -336,31 +317,27 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -370,9 +347,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -381,7 +357,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -389,9 +364,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_3096, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseFloatingLabelEditPartCN.VISUAL_ID));
}
return parser;
@@ -401,10 +375,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -433,8 +405,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -442,8 +414,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -452,56 +424,47 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -523,15 +486,14 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -545,7 +507,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -560,27 +521,26 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -588,18 +548,15 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -608,27 +565,19 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -636,7 +585,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -644,13 +592,12 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -660,10 +607,9 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -674,9 +620,8 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -697,31 +642,30 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -729,7 +673,7 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -739,13 +683,12 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -755,25 +698,20 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -783,13 +721,12 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -802,35 +739,29 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
}
}
-
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
@@ -843,7 +774,6 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -856,5 +786,4 @@ public class UseCaseFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java
index b3adde5c1ce..6adc88ca2c7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_2082, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseNameEditPart.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java
index 0e7d8407e3e..4ab2069e098 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -114,14 +114,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
@@ -136,7 +134,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -148,12 +145,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
} else {
- return ((Label) figure).getText();
+ return ((Label)figure).getText();
}
}
@@ -161,12 +158,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
} else {
- ((Label) figure).setText(text);
+ ((Label)figure).setText(text);
}
}
@@ -174,12 +171,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
} else {
- return ((Label) figure).getIcon();
+ return ((Label)figure).getIcon();
}
}
@@ -187,20 +184,19 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
} else {
- ((Label) figure).setIcon(icon);
+ ((Label)figure).setIcon(icon);
}
}
/**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -211,7 +207,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -219,7 +214,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -227,7 +221,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -244,12 +237,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected Image getLabelIcon() {
EObject parserElement = getParserElement();
- if (parserElement == null) {
+ if(parserElement == null) {
return null;
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (View view : views) {
- if (AppearanceHelper.showElementIcon(view)) {
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -262,12 +255,10 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
protected String getLabelText() {
String text = null;
EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
}
- if (text == null || text.length() == 0) {
+ if(text == null || text.length() == 0) {
text = defaultText;
}
return text;
@@ -276,30 +267,26 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
/**
* @generated
*/
- @Override
public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
/**
@@ -312,31 +299,27 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@Override
public String isValid(final Object value) {
- if (value instanceof String) {
+ if(value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -346,9 +329,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
+ if(getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
@@ -357,7 +339,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,9 +346,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public IParser getParser() {
- if (parser == null) {
+ if(parser == null) {
parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_3096, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseNameEditPartCN.VISUAL_ID));
}
return parser;
@@ -377,10 +357,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
}
return manager;
}
@@ -409,8 +387,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
}
}
@@ -418,8 +396,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
} else {
performDirectEdit();
}
@@ -428,56 +406,47 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
- switch (directEditionMode) {
+ switch(directEditionMode) {
case IDirectEdition.NO_DIRECT_EDITION:
// no direct edition mode => does nothing
return;
case IDirectEdition.EXTENDED_DIRECT_EDITOR:
updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
+ if(configuration == null || configuration.getLanguage() == null) {
// Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
performDefaultDirectEditorEdit(theRequest);
} else {
configuration.preEditAction(resolveSemanticElement());
Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()),
- configuration);
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
+ if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
}
};
domain.getCommandStack().execute(command);
@@ -499,15 +468,14 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
// initialize the direct edit manager
try {
getEditingDomain().runExclusive(new Runnable() {
+
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -521,7 +489,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -536,27 +503,26 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
+ if(maskLabelPolicy == null) {
maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
}
}
@@ -564,18 +530,15 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
}
}
}
@@ -584,27 +547,19 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -612,7 +567,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -620,13 +574,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
+ if(getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
}
} else {
super.addSemanticListeners();
@@ -636,10 +589,9 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
}
} else {
@@ -650,9 +602,8 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
+ if(accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@Override
@@ -673,31 +624,30 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return 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()) {
+ if(checkExtendedEditor()) {
initExtendedEditorConfiguration();
return IDirectEdition.EXTENDED_DIRECT_EDITOR;
}
- if (checkDefaultEdition()) {
+ 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) {
+ if(resolveSemanticElement() != null) {
return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
}
return false;
@@ -705,7 +655,7 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -715,13 +665,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
+ if(configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
+ if(languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
@@ -731,25 +680,20 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
* Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
+ * @param theRequest the direct edit request that starts the direct edit system
* @generated
*/
protected void performDefaultDirectEditorEdit(final Request theRequest) {
@@ -759,13 +703,12 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
@Override
public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
performDirectEdit(editRequest.getLocation());
} else {
performDirectEdit();
@@ -781,7 +724,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -790,7 +732,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -799,39 +740,34 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
- if (resolveSemanticElement() != null) {
+ if(resolveSemanticElement() != null) {
addSemanticListeners();
}
refreshLabel();
}
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
@@ -840,7 +776,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -854,7 +789,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -864,18 +798,15 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel()));
}
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -883,6 +814,5 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java
deleted file mode 100644
index a1f74af09f1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class AbstractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public AbstractionItemSemanticEditPolicy() {
- super(UMLElementTypes.Abstraction_4007);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 218f280da00..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActivityCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActivityCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Activity_2060);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 6cc93ec7fb2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActivityCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActivityCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Activity_3072);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 4d5098a756d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActivityCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActivityCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Activity_2060);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index a0cb21891db..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActivityCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActivityCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Activity_3072);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java
deleted file mode 100644
index 6e044f7ad3f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActorItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActorItemSemanticEditPolicy() {
- super(UMLElementTypes.Actor_2077);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java
deleted file mode 100644
index e81703b8e8c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActorItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActorItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Actor_3091);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java
deleted file mode 100644
index ba875c684ce..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class AnyReceiveEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public AnyReceiveEventItemSemanticEditPolicy() {
- super(UMLElementTypes.AnyReceiveEvent_2085);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java
deleted file mode 100644
index 9eb014f2e9a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ArtifactItemSemanticEditPolicy() {
- super(UMLElementTypes.Artifact_2079);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java
deleted file mode 100644
index a8fd0cf6f1e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ArtifactItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Artifact_3093);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java
deleted file mode 100644
index 8d5e691b375..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CallEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CallEventItemSemanticEditPolicy() {
- super(UMLElementTypes.CallEvent_2084);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java
deleted file mode 100644
index 2f6d53d4498..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ChangeEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ChangeEventItemSemanticEditPolicy() {
- super(UMLElementTypes.ChangeEvent_2088);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 6daa66b1def..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ClassCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ClassCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Class_2073);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index c9234b8af0f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ClassCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ClassCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Class_3085);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 4b411a7a4e7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ClassCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ClassCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Class_2073);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 8e506f2773b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ClassCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ClassCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Class_3085);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index f091717dab0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,99 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Collaboration_2075);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ConnectableElement_3115 == requestElementType) {
-
- return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index c6b5b8b7571..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,99 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Collaboration_3086);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ConnectableElement_3115 == requestElementType) {
-
- return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 4a8ac134619..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Collaboration_2075);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index e095be4fa87..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Collaboration_3086);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java
deleted file mode 100644
index 2db055fc00b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationRoleItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationRoleItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ConnectableElement_3115);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java
deleted file mode 100644
index 58e492b50af..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CollaborationUseItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CollaborationUseItemSemanticEditPolicyCN() {
- super(UMLElementTypes.CollaborationUse_3071);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 1f5b330f9dc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentAnnotatedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.CommentAnnotatedElement_4002);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java
deleted file mode 100644
index ba20cb62b1c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,161 +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.composite.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.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_2109);
- }
-
- /**
- * @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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java
deleted file mode 100644
index d80aaefa536..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,161 +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.composite.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.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Comment_3097);
- }
-
- /**
- * @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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index ce198b970eb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Component_2069);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index f93ae36737d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Component_3081);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index fadbcc84156..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Component_2069);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 4751d50244b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Component_3081);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java
deleted file mode 100644
index 961a0cca385..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ComponentRealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ComponentRealizationItemSemanticEditPolicy() {
- super(UMLElementTypes.ComponentRealization_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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java
deleted file mode 100644
index 0f67056d5c4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,365 +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.composite.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AnyReceiveEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CallEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ChangeEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationIntervalCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExpressionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InstanceValueCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.LiteralBooleanCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.LiteralIntegerCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.LiteralNullCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.LiteralStringCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.LiteralUnlimitedNaturalCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueExpressionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StringExpressionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeExpressionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeIntervalCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CompositeStructureDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CompositeStructureDiagramItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_1000);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Activity_2060 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_2061 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_2062 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_2063 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_2064 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_2065 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_2069 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_2070 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_2071 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_2072 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_2073 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_2075 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_2076 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_2066 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_2067 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_2068 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_2077 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_2078 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_2079 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_2080 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_2081 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_2082 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.SignalEvent_2083 == requestElementType) {
-
- return getGEFWrapper(new SignalEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CallEvent_2084 == requestElementType) {
-
- return getGEFWrapper(new CallEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.AnyReceiveEvent_2085 == requestElementType) {
-
- return getGEFWrapper(new AnyReceiveEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ChangeEvent_2088 == requestElementType) {
-
- return getGEFWrapper(new ChangeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeEvent_2089 == requestElementType) {
-
- return getGEFWrapper(new TimeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationObservation_2093 == requestElementType) {
-
- return getGEFWrapper(new DurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeObservation_2094 == requestElementType) {
-
- return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.LiteralBoolean_2095 == requestElementType) {
-
- return getGEFWrapper(new LiteralBooleanCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.LiteralInteger_2096 == requestElementType) {
-
- return getGEFWrapper(new LiteralIntegerCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.LiteralNull_2097 == requestElementType) {
-
- return getGEFWrapper(new LiteralNullCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.LiteralString_2098 == requestElementType) {
-
- return getGEFWrapper(new LiteralStringCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.LiteralUnlimitedNatural_2099 == requestElementType) {
-
- return getGEFWrapper(new LiteralUnlimitedNaturalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StringExpression_2100 == requestElementType) {
-
- return getGEFWrapper(new StringExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueExpression_2101 == requestElementType) {
-
- return getGEFWrapper(new OpaqueExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeExpression_2102 == requestElementType) {
-
- return getGEFWrapper(new TimeExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Expression_2103 == requestElementType) {
-
- return getGEFWrapper(new ExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Duration_2104 == requestElementType) {
-
- return getGEFWrapper(new DurationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeInterval_2105 == requestElementType) {
-
- return getGEFWrapper(new TimeIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationInterval_2106 == requestElementType) {
-
- return getGEFWrapper(new DurationIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interval_2107 == requestElementType) {
-
- return getGEFWrapper(new IntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InstanceValue_2108 == requestElementType) {
-
- return getGEFWrapper(new InstanceValueCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_2109 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_2110 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_2111 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_2112 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_2113 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_2114 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
- }
-
- /**
- * @generated
- */
- private static class DuplicateAnythingCommand extends DuplicateEObjectsCommand {
-
- /**
- * @generated
- */
- public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req) {
- super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java
deleted file mode 100644
index 45b68a103e9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConnectorItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConnectorItemSemanticEditPolicy() {
- super(UMLElementTypes.Connector_4013);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
deleted file mode 100644
index bf691e857ea..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.ConstraintConstrainedElement_4003);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 793df389d5a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_2114);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java
deleted file mode 100644
index cfcfc1ac3d0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Constraint_3120);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 1d704ce680c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeAttributeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.DataType_2068);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3101 == requestElementType) {
-
- return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index aea56fc5104..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeAttributeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.DataType_3080);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3101 == requestElementType) {
-
- return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java
deleted file mode 100644
index b9fe4f91522..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeItemSemanticEditPolicy() {
- super(UMLElementTypes.DataType_2068);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 0cde33c1983..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.DataType_3080);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 38ea3576bdd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OperationCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeOperationCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.DataType_2068);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Operation_3102 == requestElementType) {
-
- return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 8ccd736ef10..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OperationCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DataTypeOperationCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.DataType_3080);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Operation_3102 == requestElementType) {
-
- return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java
deleted file mode 100644
index 9efd0af4fec..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyItemSemanticEditPolicy() {
- 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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java
deleted file mode 100644
index ea209bc542e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeploymentItemSemanticEditPolicy() {
- super(UMLElementTypes.Deployment_4009);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index cd9134150ad..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeploymentSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeploymentSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.DeploymentSpecification_2078);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java
deleted file mode 100644
index e9469c2cdc2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeploymentSpecificationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeploymentSpecificationItemSemanticEditPolicyCN() {
- super(UMLElementTypes.DeploymentSpecification_3092);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 3bbd14149d4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Device_2070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 73ae475f316..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Device_3082);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 977e07d2b06..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Device_2070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index d989a12344d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Device_3082);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 55b81015e6a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationConstraint_2110);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
deleted file mode 100644
index 65fd781dcd7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.DurationConstraint_3116);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java
deleted file mode 100644
index 7e458550ca7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationIntervalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationIntervalItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationInterval_2106);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java
deleted file mode 100644
index c7e859a1481..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationItemSemanticEditPolicy() {
- super(UMLElementTypes.Duration_2104);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationEventItemSemanticEditPolicy.java
deleted file mode 100644
index c94397803e0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationObservationEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationObservationEventItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationObservationEvent_4019);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 50f68c6bae5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationObservation_2093);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 3af384bc751..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Enumeration_2067);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 87d8a386dac..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,51 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Enumeration_3079);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java
deleted file mode 100644
index c15406dd1bd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public EnumerationItemSemanticEditPolicy() {
- super(UMLElementTypes.Enumeration_2067);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java
deleted file mode 100644
index eda016478c3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public EnumerationItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Enumeration_3079);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationLiteralItemSemanticEditPolicyCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationLiteralItemSemanticEditPolicyCLN.java
deleted file mode 100644
index 7a2b801a0a1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationLiteralItemSemanticEditPolicyCLN.java
+++ /dev/null
@@ -1,61 +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.composite.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class EnumerationLiteralItemSemanticEditPolicyCLN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public EnumerationLiteralItemSemanticEditPolicyCLN() {
- super(UMLElementTypes.EnumerationLiteral_3066);
- }
-
- /**
- * @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());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index ef0f4110341..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.ExecutionEnvironment_2071);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index f5200c78f37..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ExecutionEnvironment_3083);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 7c6e50c4532..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.ExecutionEnvironment_2071);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 70239dad3a3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ExecutionEnvironment_3083);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java
deleted file mode 100644
index b620dcf4491..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExpressionItemSemanticEditPolicy() {
- super(UMLElementTypes.Expression_2103);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 73774debdd3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.FunctionBehavior_2064);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 5b2f9836770..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.FunctionBehavior_3076);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 260484ded63..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.FunctionBehavior_2064);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 37cc1b073b1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class FunctionBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public FunctionBehaviorCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.FunctionBehavior_3076);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java
deleted file mode 100644
index fab26252502..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,154 +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.composite.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.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public GeneralizationItemSemanticEditPolicy() {
- super(UMLElementTypes.Generalization_4015);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java
deleted file mode 100644
index d00a68e831b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InformationFlowItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InformationFlowItemSemanticEditPolicy() {
- super(UMLElementTypes.InformationFlow_4021);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java
deleted file mode 100644
index 10743d3b28a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,436 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InformationItemItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InformationItemItemSemanticEditPolicy() {
- super(UMLElementTypes.InformationItem_2080);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java
deleted file mode 100644
index 97df54b31e0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,436 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InformationItemItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InformationItemItemSemanticEditPolicyCN() {
- super(UMLElementTypes.InformationItem_3094);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java
deleted file mode 100644
index 37c31d8df79..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InstanceValueItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InstanceValueItemSemanticEditPolicy() {
- super(UMLElementTypes.InstanceValue_2108);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 748f7d1a151..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_2061);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 0f0505efd2e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Interaction_3073);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 26414aaf9a5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_2061);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 5389a9a1605..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Interaction_3073);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 7c99bf0c802..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.InteractionConstraint_2113);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java
deleted file mode 100644
index 8969fd16b3a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.InteractionConstraint_3119);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java
deleted file mode 100644
index 6043fa19114..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceItemSemanticEditPolicy() {
- super(UMLElementTypes.Interface_2076);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java
deleted file mode 100644
index 4029f5395f9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Interface_3087);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java
deleted file mode 100644
index 43c2fddb729..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InterfaceRealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InterfaceRealizationItemSemanticEditPolicy() {
- super(UMLElementTypes.InterfaceRealization_4005);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index e31565888b8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class IntervalConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public IntervalConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.IntervalConstraint_2112);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java
deleted file mode 100644
index 4b9c3cfe36e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class IntervalConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public IntervalConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.IntervalConstraint_3118);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java
deleted file mode 100644
index 8ec14765e31..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class IntervalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public IntervalItemSemanticEditPolicy() {
- super(UMLElementTypes.Interval_2107);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java
deleted file mode 100644
index ee59f3ad558..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LiteralBooleanItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LiteralBooleanItemSemanticEditPolicy() {
- super(UMLElementTypes.LiteralBoolean_2095);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java
deleted file mode 100644
index 7f02e426923..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LiteralIntegerItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LiteralIntegerItemSemanticEditPolicy() {
- super(UMLElementTypes.LiteralInteger_2096);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java
deleted file mode 100644
index 593f59ff2c9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LiteralNullItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LiteralNullItemSemanticEditPolicy() {
- super(UMLElementTypes.LiteralNull_2097);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java
deleted file mode 100644
index 1c569ce22a5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LiteralStringItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LiteralStringItemSemanticEditPolicy() {
- super(UMLElementTypes.LiteralString_2098);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java
deleted file mode 100644
index 6e8e1a529da..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LiteralUnlimitedNaturalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LiteralUnlimitedNaturalItemSemanticEditPolicy() {
- super(UMLElementTypes.LiteralUnlimitedNatural_2099);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java
deleted file mode 100644
index 16e7d51a3df..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ManifestationItemSemanticEditPolicy() {
- super(UMLElementTypes.Manifestation_4012);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 3247d4e1153..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Node_2072);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 9a8e0d8f04b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,225 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Node_3084);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index bb90d998e45..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.Node_2072);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java
deleted file mode 100644
index f7e27436bb5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java
+++ /dev/null
@@ -1,454 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeCompositeItemSemanticEditPolicycN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeCompositeItemSemanticEditPolicycN() {
- super(UMLElementTypes.Node_3084);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 6c51310b916..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.OpaqueBehavior_2065);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 86fcd354594..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.OpaqueBehavior_3077);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 65b8b68028e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.OpaqueBehavior_2065);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index fc1d5659a87..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OpaqueBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OpaqueBehaviorCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.OpaqueBehavior_3077);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java
deleted file mode 100644
index 7b0027ce18a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OpaqueExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OpaqueExpressionItemSemanticEditPolicy() {
- super(UMLElementTypes.OpaqueExpression_2101);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OperationItemSemanticEditPolicyCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OperationItemSemanticEditPolicyCLN.java
deleted file mode 100644
index f05252f1043..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OperationItemSemanticEditPolicyCLN.java
+++ /dev/null
@@ -1,61 +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.composite.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class OperationItemSemanticEditPolicyCLN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public OperationItemSemanticEditPolicyCLN() {
- super(UMLElementTypes.Operation_3102);
- }
-
- /**
- * @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());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java
deleted file mode 100644
index 9a4112d8b11..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ParameterItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ParameterItemSemanticEditPolicy() {
- super(UMLElementTypes.Parameter_3088);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java
deleted file mode 100644
index d4d5161a1c7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PortItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PortItemSemanticEditPolicy() {
- super(UMLElementTypes.Port_3069);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
deleted file mode 100644
index beb518757fb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PrimitiveTypeItemSemanticEditPolicy() {
- super(UMLElementTypes.PrimitiveType_2066);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
deleted file mode 100644
index ad7d05d3a8b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PrimitiveTypeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.PrimitiveType_3078);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyItemSemanticEditPolicyCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyItemSemanticEditPolicyCLN.java
deleted file mode 100644
index 89b162f6c56..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyItemSemanticEditPolicyCLN.java
+++ /dev/null
@@ -1,61 +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.composite.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PropertyItemSemanticEditPolicyCLN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PropertyItemSemanticEditPolicyCLN() {
- super(UMLElementTypes.Property_3101);
- }
-
- /**
- * @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());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 86ad6230b36..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,57 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PropertyPartCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PropertyPartCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Property_3070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
deleted file mode 100644
index 5044390e349..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,422 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PropertyPartItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PropertyPartItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Property_3070);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 7835b637243..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.ProtocolStateMachine_2062);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 527b7287dcb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ProtocolStateMachine_3074);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 88bab4a96d3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.ProtocolStateMachine_2062);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index fdb13982547..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ProtocolStateMachineCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ProtocolStateMachineCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ProtocolStateMachine_3074);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java
deleted file mode 100644
index aab5a4c2340..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class RealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public RealizationItemSemanticEditPolicy() {
- super(UMLElementTypes.Realization_4006);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RepresentationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RepresentationItemSemanticEditPolicy.java
deleted file mode 100644
index 6aaa69b44f2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RepresentationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class RepresentationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public RepresentationItemSemanticEditPolicy() {
- super(UMLElementTypes.InformationItemRepresented_4020);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java
deleted file mode 100644
index f84f0066bae..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class RoleBindingItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public RoleBindingItemSemanticEditPolicy() {
- super(UMLElementTypes.Dependency_4017);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java
deleted file mode 100644
index 7638409250a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class SignalEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public SignalEventItemSemanticEditPolicy() {
- super(UMLElementTypes.SignalEvent_2083);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java
deleted file mode 100644
index 4e51e8b4f51..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class SignalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public SignalItemSemanticEditPolicy() {
- super(UMLElementTypes.Signal_2081);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java
deleted file mode 100644
index d7c6aeb8a64..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class SignalItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public SignalItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Signal_3095);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 27690e5e2de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateMachineCompositeCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.StateMachine_2063);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
deleted file mode 100644
index 5b2ff68d774..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,231 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ClassCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DataTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentSpecificationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeviceCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ExecutionEnvironmentCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.FunctionBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationItemCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InteractionConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.IntervalConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.NodeCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OpaqueBehaviorCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PrimitiveTypeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ProtocolStateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SignalCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.StateMachineCompositeCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeConstraintCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UseCaseCreateCommandCN;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateMachineCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateMachineCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.StateMachine_3075);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Property_3070 == requestElementType) {
-
- return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Activity_3072 == requestElementType) {
-
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interaction_3073 == requestElementType) {
-
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.StateMachine_3075 == requestElementType) {
-
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Component_3081 == requestElementType) {
-
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Device_3082 == requestElementType) {
-
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Node_3084 == requestElementType) {
-
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Class_3085 == requestElementType) {
-
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Collaboration_3086 == requestElementType) {
-
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Interface_3087 == requestElementType) {
-
- return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Enumeration_3079 == requestElementType) {
-
- return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DataType_3080 == requestElementType) {
-
- return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Actor_3091 == requestElementType) {
-
- return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Artifact_3093 == requestElementType) {
-
- return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InformationItem_3094 == requestElementType) {
-
- return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Signal_3095 == requestElementType) {
-
- return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.UseCase_3096 == requestElementType) {
-
- return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Comment_3097 == requestElementType) {
-
- return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Constraint_3120 == requestElementType) {
-
- return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java
deleted file mode 100644
index 0dca1a06f28..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateMachineCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateMachineCompositeItemSemanticEditPolicy() {
- super(UMLElementTypes.StateMachine_2063);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java
deleted file mode 100644
index 495f207f222..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,460 +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.composite.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.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.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.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ParameterCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateMachineCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateMachineCompositeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.StateMachine_3075);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
-
-
- if (UMLElementTypes.Port_3069 == requestElementType) {
-
- return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- if (UMLElementTypes.Parameter_3088 == requestElementType) {
-
- return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java
deleted file mode 100644
index 94c0f876d2f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StringExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StringExpressionItemSemanticEditPolicy() {
- super(UMLElementTypes.StringExpression_2100);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java
deleted file mode 100644
index 053440fb3ee..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class SubstitutionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public SubstitutionItemSemanticEditPolicy() {
- super(UMLElementTypes.Substitution_4011);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 42147d5d4fb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeConstraint_2111);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java
deleted file mode 100644
index e210897333d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.TimeConstraint_3117);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java
deleted file mode 100644
index 9271b399fad..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeEventItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeEvent_2089);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java
deleted file mode 100644
index d83390ac73c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeExpressionItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeExpression_2102);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java
deleted file mode 100644
index fcddee54f24..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeIntervalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeIntervalItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeInterval_2105);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationEventSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationEventSemanticEditPolicy.java
deleted file mode 100644
index 6cd51c4fcde..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationEventSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +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.composite.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeObservationEventSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeObservationEventSemanticEditPolicy() {
- super(UMLElementTypes.TimeObservationEvent_4018);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 66ab541585f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,404 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeObservation_2094);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 1cb89f7f6b1..ee568a059c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -45,7 +45,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipReques
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.composite.part.UMLDiagramEditorPlugin;
@@ -98,14 +97,12 @@ 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$
@@ -129,18 +126,17 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* 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
- *
+ * 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));
+ 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);
}
@@ -150,24 +146,22 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* 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;
+ 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;
+ if(completedRequest instanceof DestroyRequest) {
+ DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
}
return semanticCommand;
@@ -177,7 +171,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
}
@@ -185,8 +179,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
- if (editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(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);
@@ -194,8 +188,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
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)) {
+ if(command != null) {
+ if(!(command instanceof CompositeTransactionalCommand)) {
command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
}
return new ICommandProxy(command);
@@ -215,28 +209,28 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @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);
+ 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;
}
@@ -260,12 +254,11 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getCreateCommand(CreateElementRequest req) {
IElementType requestElementType = req.getElementType();
- if (requestElementType instanceof IExtendedHintedElementType) {
- // try to get a semantic create command from the extended type
+ if(requestElementType instanceof IElementType) {
IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
- if (commandProvider != null) {
+ if(commandProvider != null) {
ICommand command = commandProvider.getEditCommand(req);
- if (command != null && command.canExecute()) {
+ if(command != null && command.canExecute()) {
return new ICommandProxy(command);
}
}
@@ -277,9 +270,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
- if (provider == null) {
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -290,9 +283,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
- if (provider == null) {
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -303,9 +296,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
- if (provider == null) {
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -354,11 +347,11 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getMoveCommand(MoveRequest req) {
EObject targetCEObject = req.getTargetContainer();
- if (targetCEObject != null) {
+ if(targetCEObject != null) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
- if (provider != null) {
+ if(provider != null) {
ICommand moveCommand = provider.getEditCommand(req);
- if (moveCommand != null) {
+ if(moveCommand != null) {
return new ICommandProxy(moveCommand);
}
}
@@ -366,7 +359,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
} else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
@@ -387,28 +379,26 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
+ return (cmd == null) ? UnexecutableCommand.INSTANCE : new ICommandProxy(cmd);
}
/**
* Returns editing domain from the host edit part.
- *
* @generated
*/
protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).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$
+ 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));
@@ -420,7 +410,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
public static LinkConstraints getLinkConstraints() {
LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
- if (cached == null) {
+ if(cached == null) {
UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
}
return cached;
@@ -455,182 +445,151 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public boolean canCreateCommentAnnotatedElement_4002(Comment source, Element target) {
- if (source != null) {
- if (source.getAnnotatedElements()
- .contains(target)) {
+ if(source != null) {
+ if(source.getAnnotatedElements().contains(target)) {
return false;
}
}
-
- return canExistCommentAnnotatedElement_4002(
- source, target);
+ return canExistCommentAnnotatedElement_4002(source, target);
}
/**
* @generated
*/
public boolean canCreateConstraintConstrainedElement_4003(Constraint source, Element target) {
- if (source != null) {
- if (source.getConstrainedElements()
- .contains(target)) {
+ if(source != null) {
+ if(source.getConstrainedElements().contains(target)) {
return false;
}
}
-
- return canExistConstraintConstrainedElement_4003(
- source, target);
+ return canExistConstraintConstrainedElement_4003(source, target);
}
/**
* @generated
*/
public boolean canCreateComponentRealization_4004(Package container, NamedElement source, NamedElement target) {
- return canExistComponentRealization_4004(
- container, null, source, target);
+ return canExistComponentRealization_4004(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateInterfaceRealization_4005(Package container, NamedElement source, NamedElement target) {
- return canExistInterfaceRealization_4005(
- container, null, source, target);
+ return canExistInterfaceRealization_4005(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateSubstitution_4011(Package container, NamedElement source, NamedElement target) {
- return canExistSubstitution_4011(
- container, null, source, target);
+ return canExistSubstitution_4011(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateRealization_4006(Package container, NamedElement source, NamedElement target) {
- return canExistRealization_4006(
- container, null, source, target);
+ return canExistRealization_4006(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateManifestation_4012(Package container, NamedElement source, NamedElement target) {
- return canExistManifestation_4012(
- container, null, source, target);
+ return canExistManifestation_4012(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateAbstraction_4007(Package container, NamedElement source, NamedElement target) {
- return canExistAbstraction_4007(
- container, null, source, target);
+ return canExistAbstraction_4007(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateUsage_4008(Package container, NamedElement source, NamedElement target) {
- return canExistUsage_4008(
- container, null, source, target);
+ return canExistUsage_4008(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateDeployment_4009(Package container, NamedElement source, NamedElement target) {
- return canExistDeployment_4009(
- container, null, source, target);
+ return canExistDeployment_4009(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateDependency_4017(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_4017(
- container, null, source, target);
+ return canExistDependency_4017(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateDependency_4010(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_4010(
- container, null, source, target);
+ return canExistDependency_4010(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateConnector_4013(StructuredClassifier container, ConnectorEnd source, ConnectorEnd target) {
- return canExistConnector_4013(
- container, null, source, target);
+ return canExistConnector_4013(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateGeneralization_4015(Classifier container, Classifier source, Classifier target) {
- return canExistGeneralization_4015(
- container, null, source, target);
+ return canExistGeneralization_4015(container, null, source, target);
}
/**
* @generated
*/
public boolean canCreateTimeObservationEvent_4018(TimeObservation source, NamedElement target) {
- if (source != null) {
- if (source.getEvent()
- != null) {
+ if(source != null) {
+ if(source.getEvent() != null) {
return false;
}
}
-
- return canExistTimeObservationEvent_4018(
- source, target);
+ return canExistTimeObservationEvent_4018(source, target);
}
/**
* @generated
*/
public boolean canCreateDurationObservationEvent_4019(DurationObservation source, NamedElement target) {
- if (source != null) {
- if (source.getEvents()
- .size() >= 2
- ||
- source.getEvents()
- .contains(target)) {
+ if(source != null) {
+ if(source.getEvents().size() >= 2 || source.getEvents().contains(target)) {
return false;
}
}
-
- return canExistDurationObservationEvent_4019(
- source, target);
+ return canExistDurationObservationEvent_4019(source, target);
}
/**
* @generated
*/
public boolean canCreateInformationItemRepresented_4020(InformationItem source, Classifier target) {
- if (source != null) {
- if (source.getRepresenteds()
- .contains(target)) {
+ if(source != null) {
+ if(source.getRepresenteds().contains(target)) {
return false;
}
}
-
- return canExistInformationItemRepresented_4020(
- source, target);
+ return canExistInformationItemRepresented_4020(source, target);
}
/**
* @generated
*/
public boolean canCreateInformationFlow_4021(Package container, NamedElement source, NamedElement target) {
- return canExistInformationFlow_4021(
- container, null, source, target);
+ return canExistInformationFlow_4021(container, null, source, target);
}
/**
@@ -723,19 +682,19 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
public boolean canExistDependency_4017(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
try {
// RoleBinding source constraint
- if ((source != null) && !(source instanceof CollaborationUse)) {
+ if((source != null) && !(source instanceof CollaborationUse)) {
return false;
}
// RoleBinding source has a type
- if ((source != null) && (((CollaborationUse) source).getType() == null)) {
+ if((source != null) && (((CollaborationUse)source).getType() == null)) {
return false;
}
// RoleBinding target constraint
- if ((target != null) && !(target instanceof ConnectableElement)) {
+ if((target != null) && !(target instanceof ConnectableElement)) {
return false;
}
// RoleBinding source and target have the same semantic parent
- if ((source != null) && (target != null) && (source.getOwner() != target.getOwner())) {
+ if((source != null) && (target != null) && (source.getOwner() != target.getOwner())) {
return false;
}
return true;
@@ -786,11 +745,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
public boolean canExistInformationItemRepresented_4020(InformationItem source, Classifier target) {
try {
// Represented InformationItem Target
- if (target != null) {
- if (!((target instanceof Class)
- || (target instanceof Interface)
- || (target instanceof InformationItem)
- || (target instanceof Signal) || (target instanceof Component))) {
+ if(target != null) {
+ if(!((target instanceof Class) || (target instanceof Interface) || (target instanceof InformationItem) || (target instanceof Signal) || (target instanceof Component))) {
return false;
}
}
@@ -806,55 +762,29 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
public boolean canExistInformationFlow_4021(Package container, InformationFlow linkInstance, NamedElement source, NamedElement target) {
try {
- // Information Flow source constraint
- if (source != null) {
- if (!((source instanceof Actor)
- || (source instanceof Node)
- || (source instanceof UseCase)
- || (source instanceof Artifact)
- || (source instanceof Class)
- || (source instanceof Component)
- || (source instanceof Port)
- || (source instanceof Property)
- || (source instanceof Interface)
- || (source instanceof Package)
- || (source instanceof ActivityNode)
- || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
-
+ //Information Flow source constraint
+ if(source != null) {
+ if(!((source instanceof Actor) || (source instanceof Node) || (source instanceof UseCase) || (source instanceof Artifact) || (source instanceof Class) || (source instanceof Component) || (source instanceof Port) || (source instanceof Property) || (source instanceof Interface) || (source instanceof Package) || (source instanceof ActivityNode) || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
return false;
-
}
- if (source instanceof InstanceSpecification) {
- EList<Classifier> classes = ((InstanceSpecification) source).getClassifiers();
- for (int i = 0; i < classes.size(); i++) {
- if (classes.get(i) instanceof Relationship) {
+ if(source instanceof InstanceSpecification) {
+ EList<Classifier> classes = ((InstanceSpecification)source).getClassifiers();
+ for(int i = 0; i < classes.size(); i++) {
+ if(classes.get(i) instanceof Relationship) {
return false;
}
}
}
}
- // Information Flow target constraint
- if (target != null) {
- if (!((target instanceof Actor)
- || (target instanceof Node)
- || (target instanceof UseCase)
- || (target instanceof Artifact)
- || (target instanceof Class)
- || (target instanceof Component)
- || (target instanceof Port)
- || (target instanceof Property)
- || (target instanceof Interface)
- || (target instanceof Package)
- || (target instanceof ActivityNode)
- || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
-
+ //Information Flow target constraint
+ if(target != null) {
+ if(!((target instanceof Actor) || (target instanceof Node) || (target instanceof UseCase) || (target instanceof Artifact) || (target instanceof Class) || (target instanceof Component) || (target instanceof Port) || (target instanceof Property) || (target instanceof Interface) || (target instanceof Package) || (target instanceof ActivityNode) || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
return false;
-
}
- if (target instanceof InstanceSpecification) {
- EList<Classifier> classes = ((InstanceSpecification) target).getClassifiers();
- for (int i = 0; i < classes.size(); i++) {
- if (classes.get(i) instanceof Relationship) {
+ if(target instanceof InstanceSpecification) {
+ EList<Classifier> classes = ((InstanceSpecification)target).getClassifiers();
+ for(int i = 0; i < classes.size(); i++) {
+ if(classes.get(i) instanceof Relationship) {
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextNonResizableEditPolicy.java
index 630d22f7675..9f08f43c77d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -52,11 +52,10 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(true);
+ ((WrappingLabel)getHostFigure()).setFocus(true);
} else {
showSelection();
showFocus();
@@ -66,11 +65,10 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(true);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
@@ -83,13 +81,12 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(false);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if (selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure != null) {
removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
selectionFeedbackFigure = null;
@@ -101,10 +98,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
@@ -115,12 +111,11 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if (focusFeedbackFigure != null) {
+ if(focusFeedbackFigure != null) {
removeFeedback(focusFeedbackFigure);
focusFeedbackFigure = null;
}
@@ -132,8 +127,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
*/
protected Rectangle getFeedbackBounds() {
Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
+ if(getHostFigure() instanceof Label) {
+ bounds = ((Label)getHostFigure()).getTextBounds();
bounds.intersect(getHostFigure().getBounds());
} else {
bounds = getHostFigure().getBounds().getCopy();
@@ -147,7 +142,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
+ if(getHostFigure() instanceof Label) {
Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
@@ -177,7 +172,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -187,9 +182,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
@@ -201,7 +196,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
+ if(focusFeedbackFigure != null) {
focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -219,8 +214,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
private FigureListener getHostPositionListener() {
- if (hostPositionListener == null) {
+ if(hostPositionListener == null) {
hostPositionListener = new FigureListener() {
+
@Override
public void figureMoved(IFigure source) {
refreshFeedback();
@@ -233,10 +229,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- @Override
protected List<?> createSelectionHandles() {
- MoveHandle moveHandle =
- new MoveHandle((GraphicalEditPart) getHost());
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextSelectionEditPolicy.java
index dbe91ab6ed5..861ee3973bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLTextSelectionEditPolicy.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -46,11 +46,10 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- @Override
protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(true);
+ ((WrappingLabel)getHostFigure()).setFocus(true);
} else {
showSelection();
showFocus();
@@ -60,11 +59,10 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- @Override
protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(true);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
@@ -77,13 +75,12 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- @Override
protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setSelected(false);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if (selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure != null) {
removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
selectionFeedbackFigure = null;
@@ -95,10 +92,9 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- @Override
protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
@@ -109,12 +105,11 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- @Override
protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
+ if(getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if (focusFeedbackFigure != null) {
+ if(focusFeedbackFigure != null) {
removeFeedback(focusFeedbackFigure);
focusFeedbackFigure = null;
}
@@ -126,8 +121,8 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
*/
protected Rectangle getFeedbackBounds() {
Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
+ if(getHostFigure() instanceof Label) {
+ bounds = ((Label)getHostFigure()).getTextBounds();
bounds.intersect(getHostFigure().getBounds());
} else {
bounds = getHostFigure().getBounds().getCopy();
@@ -141,7 +136,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
+ if(getHostFigure() instanceof Label) {
Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
@@ -171,7 +166,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -181,9 +176,9 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
@@ -195,7 +190,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
+ if(focusFeedbackFigure != null) {
focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -213,8 +208,9 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
private FigureListener getHostPositionListener() {
- if (hostPositionListener == null) {
+ if(hostPositionListener == null) {
hostPositionListener = new FigureListener() {
+
@Override
public void figureMoved(IFigure source) {
refreshFeedback();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java
deleted file mode 100644
index 34bb3b98e9d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,400 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UsageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public UsageItemSemanticEditPolicy() {
- super(UMLElementTypes.Usage_4008);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java
deleted file mode 100644
index 9d4c993ce91..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UseCaseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public UseCaseItemSemanticEditPolicy() {
- super(UMLElementTypes.UseCase_2082);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java
deleted file mode 100644
index b62d9023cdd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java
+++ /dev/null
@@ -1,432 +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.composite.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.composite.edit.commands.AbstractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ComponentRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.DurationObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InformationFlowCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.InterfaceRealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RealizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RepresentationReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.RoleBindingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.SubstitutionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.TimeObservationEventReorientCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.commands.UsageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.AbstractionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ComponentRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.DurationObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InformationFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.InterfaceRealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RealizationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RepresentationEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.RoleBindingEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.SubstitutionEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEventEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UsageEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UseCaseItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public UseCaseItemSemanticEditPolicyCN() {
- super(UMLElementTypes.UseCase_3096);
- }
-
- /**
- * @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_4002 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ComponentRealization_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ComponentRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InterfaceRealization_4005 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InterfaceRealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Substitution_4011 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new SubstitutionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Realization_4006 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RealizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4012 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Abstraction_4007 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new AbstractionCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Usage_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new UsageCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4017 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RoleBindingCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4015 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.TimeObservationEvent_4018 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new TimeObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.DurationObservationEvent_4019 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DurationObservationEventCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationItemRepresented_4020 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new RepresentationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.InformationFlow_4021 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new InformationFlowCreateCommand(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 ComponentRealizationEditPart.VISUAL_ID:
- case InterfaceRealizationEditPart.VISUAL_ID:
- case SubstitutionEditPart.VISUAL_ID:
- case RealizationEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case AbstractionEditPart.VISUAL_ID:
- case UsageEditPart.VISUAL_ID:
- case DeploymentEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case InformationFlowEditPart.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());
- case RoleBindingEditPart.VISUAL_ID:
- return getGEFWrapper(new RoleBindingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @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));
- case TimeObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new TimeObservationEventReorientCommand(req));
- case DurationObservationEventEditPart.VISUAL_ID:
- return getGEFWrapper(new DurationObservationEventReorientCommand(req));
- case RepresentationEditPart.VISUAL_ID:
- return getGEFWrapper(new RepresentationReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/AbstractParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/AbstractParser.java
index a625f09edb5..663b3700530 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/AbstractParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/AbstractParser.java
@@ -1 +1 @@
-// Since GMFT 3.1 we don't generate class AbstractParser into every diagram, instead extend org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser.
+//Since GMFT 3.1 we don't generate class AbstractParser into every diagram, instead extend org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java
index f0bcc52246c..40eafa33f56 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -74,10 +74,10 @@ public class MessageFormatParser extends AbstractAttributeParser {
* @generated
*/
protected String getDefaultPattern() {
- if (defaultPattern == null) {
+ if(defaultPattern == null) {
StringBuffer sb = new StringBuffer();
- for (int i = 0; i < features.length; i++) {
- if (i > 0) {
+ for(int i = 0; i < features.length; i++) {
+ if(i > 0) {
sb.append(' ');
}
sb.append('{');
@@ -92,7 +92,6 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public void setViewPattern(String viewPattern) {
super.setViewPattern(viewPattern);
viewProcessor = null;
@@ -101,7 +100,6 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public void setEditorPattern(String editorPattern) {
super.setEditorPattern(editorPattern);
editorProcessor = null;
@@ -111,7 +109,7 @@ public class MessageFormatParser extends AbstractAttributeParser {
* @generated
*/
protected MessageFormat getViewProcessor() {
- if (viewProcessor == null) {
+ if(viewProcessor == null) {
viewProcessor = new MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
}
return viewProcessor;
@@ -121,7 +119,7 @@ public class MessageFormatParser extends AbstractAttributeParser {
* @generated
*/
protected MessageFormat getEditorProcessor() {
- if (editorProcessor == null) {
+ if(editorProcessor == null) {
editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
}
return editorProcessor;
@@ -131,10 +129,10 @@ public class MessageFormatParser extends AbstractAttributeParser {
* @generated
*/
protected String getDefaultEditablePattern() {
- if (defaultEditablePattern == null) {
+ if(defaultEditablePattern == null) {
StringBuffer sb = new StringBuffer();
- for (int i = 0; i < editableFeatures.length; i++) {
- if (i > 0) {
+ for(int i = 0; i < editableFeatures.length; i++) {
+ if(i > 0) {
sb.append(' ');
}
sb.append('{');
@@ -149,7 +147,6 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public void setEditPattern(String editPattern) {
super.setEditPattern(editPattern);
editProcessor = null;
@@ -159,7 +156,7 @@ public class MessageFormatParser extends AbstractAttributeParser {
* @generated
*/
protected MessageFormat getEditProcessor() {
- if (editProcessor == null) {
+ if(editProcessor == null) {
editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
}
return editProcessor;
@@ -168,26 +165,19 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
+ 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())));
+ if(values == null) {
+ return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, NLS.bind(Messages.MessageFormatParser_InvalidInputError, new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
@@ -195,7 +185,6 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
Object[] values = getEditProcessor().parse(newString, new ParsePosition(0));
return getParseCommand(adapter, values, flags);
@@ -204,9 +193,8 @@ public class MessageFormatParser extends AbstractAttributeParser {
/**
* @generated
*/
- @Override
public String getPrintString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/DiagramEditorContextMenuProvider.java
index 612f2ab8b67..4600dcb97ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/DiagramEditorContextMenuProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/DiagramEditorContextMenuProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -41,17 +41,14 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider
/**
* @generated
*/
- @Override
public void buildContextMenu(final IMenuManager menu) {
getViewer().flush();
try {
- TransactionUtil.getEditingDomain(
- (EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
+ TransactionUtil.getEditingDomain((EObject)getViewer().getContents().getModel()).runExclusive(new Runnable() {
@Override
public void run() {
- ContributionItemService.getInstance().contributeToPopupMenu(
- DiagramEditorContextMenuProvider.this, part);
+ ContributionItemService.getInstance().contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part);
menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
}
});
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/LoadResourceAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/LoadResourceAction.java
index 43e07b3d105..1de441057e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/LoadResourceAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/LoadResourceAction.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -23,7 +23,6 @@ public class LoadResourceAction extends DefaultLoadResourceAction {
/**
* @generated
*/
- @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return super.execute(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/Messages.java
index fca4190575b..caf7f75c56e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/Messages.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -454,6 +454,16 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String StringExpressionCreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String StringExpressionCreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String LinkCreationTool_title;
/**
@@ -564,6 +574,26 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String ManifestationCreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String ManifestationCreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String DeploymentCreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String DeploymentCreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String DataTypeAttributeCompartmentEditPart_title;
/**
@@ -735,5 +765,5 @@ public class Messages extends NLS {
* @generated
*/
public static String UMLModelingAssistantProviderMessage;
- // TODO: put accessor fields manually
+ //TODO: put accessor fields manually
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ModelElementSelectionPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ModelElementSelectionPage.java
index fd7ab40c090..8bd2c0f3525 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ModelElementSelectionPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ModelElementSelectionPage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -15,7 +15,6 @@ import org.eclipse.gmf.tooling.runtime.part.DefaultModelElementSelectionPage;
/**
* Wizard page that allows to select element from model.
- *
* @generated
*/
public class ModelElementSelectionPage extends DefaultModelElementSelectionPage {
@@ -29,10 +28,8 @@ public class ModelElementSelectionPage extends DefaultModelElementSelectionPage
/**
* Override to provide custom model element description.
- *
* @generated
*/
- @Override
protected String getSelectionTitle() {
return Messages.ModelElementSelectionPageMessage;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java
index ba503192262..aa0b7007e29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -98,7 +98,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
/**
* @generated
*/
- @Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
@@ -110,22 +109,19 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
/**
* @generated
*/
- @Override
public void addPages() {
diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), "uml_csd"); //$NON-NLS-1$ //$NON-NLS-2$
diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
-
domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "uml") { //$NON-NLS-1$ //$NON-NLS-2$
@Override
public void setVisible(boolean visible) {
- if (visible) {
+ if(visible) {
String fileName = diagramModelFilePage.getFileName();
fileName = fileName.substring(0, fileName.length() - ".uml_csd".length()); //$NON-NLS-1$
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), fileName, "uml")); //$NON-NLS-1$
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), fileName, "uml")); //$NON-NLS-1$
}
super.setVisible(visible);
}
@@ -138,36 +134,28 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
/**
* @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());
- }
- }
+ 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());
+ 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$
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizardPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizardPage.java
index b11f93abeee..8fc3cc6f01b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizardPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizardPage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -39,7 +39,7 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage {
/**
* Override to create files with this extension.
- *
+ *
* @generated
*/
protected String getExtension() {
@@ -58,11 +58,11 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage {
*/
protected IPath getFilePath() {
IPath path = getContainerFullPath();
- if (path == null) {
+ if(path == null) {
path = new Path(""); //$NON-NLS-1$
}
String fileName = getFileName();
- if (fileName != null) {
+ if(fileName != null) {
path = path.append(fileName);
}
return path;
@@ -71,26 +71,22 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage {
/**
* @generated
*/
- @Override
public void createControl(Composite parent) {
super.createControl(parent);
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), getFileName(), getExtension()));
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), getFileName(), getExtension()));
setPageComplete(validatePage());
}
/**
* @generated
*/
- @Override
protected boolean validatePage() {
- if (!super.validatePage()) {
+ if(!super.validatePage()) {
return false;
}
String extension = getExtension();
- if (extension != null && !getFilePath().toString().endsWith("." + extension)) {
- setErrorMessage(NLS.bind(
- Messages.UMLCreationWizardPageExtensionError, extension));
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramActionBarContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramActionBarContributor.java
index 4f8b2e286d0..e27930b693b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramActionBarContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramActionBarContributor.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -27,7 +27,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
protected Class<UMLDiagramEditor> getEditorClass() {
return UMLDiagramEditor.class;
}
@@ -35,7 +34,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
protected String getEditorId() {
return UMLDiagramEditor.ID;
}
@@ -43,7 +41,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
public void init(IActionBars bars, IWorkbenchPage page) {
super.init(bars, page);
// print preview
@@ -52,7 +49,7 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
IMenuManager editMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
assert editMenu != null;
- if (editMenu.find("validationGroup") == null) { //$NON-NLS-1$
+ if(editMenu.find("validationGroup") == null) { //$NON-NLS-1$
editMenu.add(new GroupMarker("validationGroup")); //$NON-NLS-1$
}
IAction validateAction = new ValidateAction(page);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramContentInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramContentInitializer.java
index 850bc3ee5ce..50fe9dd3160 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramContentInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramContentInitializer.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -45,11 +45,11 @@ public class UMLDiagramContentInitializer {
* @generated
*/
public void initDiagramContent(Diagram diagram) {
- if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(diagram.getType())) {
+ if(!CompositeStructureDiagramEditPart.MODEL_ID.equals(diagram.getType())) {
UMLDiagramEditorPlugin.getInstance().logError("Incorrect diagram passed as a parameter: " + diagram.getType());
return;
}
- if (false == diagram.getElement() instanceof Package) {
+ if(false == diagram.getElement() instanceof Package) {
UMLDiagramEditorPlugin.getInstance().logError("Incorrect diagram element specified: " + diagram.getElement() + " instead of Package");
return;
}
@@ -61,10 +61,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createPackage_1000Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getPackage_1000SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getPackage_1000SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -73,12 +72,10 @@ public class UMLDiagramContentInitializer {
*/
private void createActivity_2060Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getActivity_2060OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getActivity_2060SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getActivity_2060OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getActivity_2060SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createActivityInternalstructure_7063Children(getCompartment(view, ActivityCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -88,12 +85,10 @@ public class UMLDiagramContentInitializer {
*/
private void createInteraction_2061Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInteraction_2061OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getInteraction_2061SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInteraction_2061OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getInteraction_2061SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createInteractionInternalstructure_7064Children(getCompartment(view, InteractionCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -103,12 +98,10 @@ public class UMLDiagramContentInitializer {
*/
private void createProtocolStateMachine_2062Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachine_2062OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachine_2062SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getProtocolStateMachine_2062OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getProtocolStateMachine_2062SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createProtocolStateMachineInternalstructure_7065Children(getCompartment(view, ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -118,12 +111,10 @@ public class UMLDiagramContentInitializer {
*/
private void createStateMachine_2063Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getStateMachine_2063OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getStateMachine_2063SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getStateMachine_2063OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getStateMachine_2063SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createStateMachineInternalstructure_7066Children(getCompartment(view, StateMachineCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -133,12 +124,10 @@ public class UMLDiagramContentInitializer {
*/
private void createFunctionBehavior_2064Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getFunctionBehavior_2064OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getFunctionBehavior_2064SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getFunctionBehavior_2064OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getFunctionBehavior_2064SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createFunctionBehaviorInternalstructure_7067Children(getCompartment(view, FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -148,12 +137,10 @@ public class UMLDiagramContentInitializer {
*/
private void createOpaqueBehavior_2065Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getOpaqueBehavior_2065OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getOpaqueBehavior_2065SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getOpaqueBehavior_2065OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getOpaqueBehavior_2065SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createOpaqueBehaviorInternalstructure_7068Children(getCompartment(view, OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -163,12 +150,10 @@ public class UMLDiagramContentInitializer {
*/
private void createComponent_2069Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getComponent_2069OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponent_2069SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getComponent_2069OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getComponent_2069SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createComponentInternalstructure_7069Children(getCompartment(view, ComponentCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -178,12 +163,10 @@ public class UMLDiagramContentInitializer {
*/
private void createDevice_2070Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDevice_2070OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDevice_2070SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDevice_2070OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDevice_2070SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createDeviceInternalstructure_7070Children(getCompartment(view, DeviceCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -193,12 +176,10 @@ public class UMLDiagramContentInitializer {
*/
private void createExecutionEnvironment_2071Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_2071OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_2071SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getExecutionEnvironment_2071OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getExecutionEnvironment_2071SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createExecutionEnvironmentInternalstructure_7071Children(getCompartment(view, ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -208,12 +189,10 @@ public class UMLDiagramContentInitializer {
*/
private void createNode_2072Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getNode_2072OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getNode_2072SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getNode_2072OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getNode_2072SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createNodeInternalstructure_7072Children(getCompartment(view, NodeCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -223,12 +202,10 @@ public class UMLDiagramContentInitializer {
*/
private void createClass_2073Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getClass_2073OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getClass_2073SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getClass_2073OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getClass_2073SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createClassInternalstructure_7073Children(getCompartment(view, ClassCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -238,8 +215,7 @@ public class UMLDiagramContentInitializer {
*/
private void createCollaboration_2075Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getCollaboration_2075OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getCollaboration_2075OutgoingLinks(view));
createCollaborationInternalstructure_7075Children(getCompartment(view, CollaborationCompositeCompartmentEditPart.VISUAL_ID));
}
@@ -248,8 +224,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInterface_2076Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_2076OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInterface_2076OutgoingLinks(view));
}
/**
@@ -257,8 +232,7 @@ public class UMLDiagramContentInitializer {
*/
private void createPrimitiveType_2066Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getPrimitiveType_2066OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getPrimitiveType_2066OutgoingLinks(view));
}
/**
@@ -266,12 +240,10 @@ public class UMLDiagramContentInitializer {
*/
private void createEnumeration_2067Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getEnumeration_2067OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getEnumeration_2067SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getEnumeration_2067OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getEnumeration_2067SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createEnumerationLiterals_7048Children(getCompartment(view, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID));
}
@@ -281,8 +253,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDataType_2068Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDataType_2068OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDataType_2068OutgoingLinks(view));
createDataTypeAttributes_7033Children(getCompartment(view, DataTypeAttributeCompartmentEditPart.VISUAL_ID));
createDataTypeOperations_7034Children(getCompartment(view, DataTypeOperationCompartmentEditPart.VISUAL_ID));
}
@@ -292,8 +263,7 @@ public class UMLDiagramContentInitializer {
*/
private void createActor_2077Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getActor_2077OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getActor_2077OutgoingLinks(view));
}
/**
@@ -301,8 +271,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDeploymentSpecification_2078Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDeploymentSpecification_2078OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDeploymentSpecification_2078OutgoingLinks(view));
}
/**
@@ -310,8 +279,7 @@ public class UMLDiagramContentInitializer {
*/
private void createArtifact_2079Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_2079OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getArtifact_2079OutgoingLinks(view));
}
/**
@@ -319,8 +287,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInformationItem_2080Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInformationItem_2080OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInformationItem_2080OutgoingLinks(view));
}
/**
@@ -328,8 +295,7 @@ public class UMLDiagramContentInitializer {
*/
private void createSignal_2081Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getSignal_2081OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getSignal_2081OutgoingLinks(view));
}
/**
@@ -337,8 +303,7 @@ public class UMLDiagramContentInitializer {
*/
private void createUseCase_2082Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getUseCase_2082OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getUseCase_2082OutgoingLinks(view));
}
/**
@@ -346,8 +311,7 @@ public class UMLDiagramContentInitializer {
*/
private void createSignalEvent_2083Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getSignalEvent_2083OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getSignalEvent_2083OutgoingLinks(view));
}
/**
@@ -355,8 +319,7 @@ public class UMLDiagramContentInitializer {
*/
private void createCallEvent_2084Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getCallEvent_2084OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getCallEvent_2084OutgoingLinks(view));
}
/**
@@ -364,8 +327,7 @@ public class UMLDiagramContentInitializer {
*/
private void createAnyReceiveEvent_2085Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getAnyReceiveEvent_2085OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getAnyReceiveEvent_2085OutgoingLinks(view));
}
/**
@@ -373,8 +335,7 @@ public class UMLDiagramContentInitializer {
*/
private void createChangeEvent_2088Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getChangeEvent_2088OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getChangeEvent_2088OutgoingLinks(view));
}
/**
@@ -382,8 +343,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeEvent_2089Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeEvent_2089OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeEvent_2089OutgoingLinks(view));
}
/**
@@ -391,8 +351,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDurationObservation_2093Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDurationObservation_2093OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDurationObservation_2093OutgoingLinks(view));
}
/**
@@ -400,8 +359,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeObservation_2094Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeObservation_2094OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeObservation_2094OutgoingLinks(view));
}
/**
@@ -409,8 +367,7 @@ public class UMLDiagramContentInitializer {
*/
private void createLiteralBoolean_2095Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getLiteralBoolean_2095OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getLiteralBoolean_2095OutgoingLinks(view));
}
/**
@@ -418,8 +375,7 @@ public class UMLDiagramContentInitializer {
*/
private void createLiteralInteger_2096Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getLiteralInteger_2096OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getLiteralInteger_2096OutgoingLinks(view));
}
/**
@@ -427,8 +383,7 @@ public class UMLDiagramContentInitializer {
*/
private void createLiteralNull_2097Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getLiteralNull_2097OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getLiteralNull_2097OutgoingLinks(view));
}
/**
@@ -436,8 +391,7 @@ public class UMLDiagramContentInitializer {
*/
private void createLiteralString_2098Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getLiteralString_2098OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getLiteralString_2098OutgoingLinks(view));
}
/**
@@ -445,8 +399,7 @@ public class UMLDiagramContentInitializer {
*/
private void createLiteralUnlimitedNatural_2099Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getLiteralUnlimitedNatural_2099OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getLiteralUnlimitedNatural_2099OutgoingLinks(view));
}
/**
@@ -454,8 +407,7 @@ public class UMLDiagramContentInitializer {
*/
private void createStringExpression_2100Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getStringExpression_2100OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getStringExpression_2100OutgoingLinks(view));
}
/**
@@ -463,8 +415,7 @@ public class UMLDiagramContentInitializer {
*/
private void createOpaqueExpression_2101Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getOpaqueExpression_2101OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getOpaqueExpression_2101OutgoingLinks(view));
}
/**
@@ -472,8 +423,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeExpression_2102Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeExpression_2102OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeExpression_2102OutgoingLinks(view));
}
/**
@@ -481,8 +431,7 @@ public class UMLDiagramContentInitializer {
*/
private void createExpression_2103Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getExpression_2103OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getExpression_2103OutgoingLinks(view));
}
/**
@@ -490,8 +439,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDuration_2104Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDuration_2104OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDuration_2104OutgoingLinks(view));
}
/**
@@ -499,8 +447,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeInterval_2105Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeInterval_2105OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeInterval_2105OutgoingLinks(view));
}
/**
@@ -508,8 +455,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDurationInterval_2106Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDurationInterval_2106OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDurationInterval_2106OutgoingLinks(view));
}
/**
@@ -517,8 +463,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInterval_2107Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInterval_2107OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInterval_2107OutgoingLinks(view));
}
/**
@@ -526,8 +471,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInstanceValue_2108Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInstanceValue_2108OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInstanceValue_2108OutgoingLinks(view));
}
/**
@@ -535,8 +479,7 @@ public class UMLDiagramContentInitializer {
*/
private void createComment_2109Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_2109OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getComment_2109OutgoingLinks(view));
}
/**
@@ -544,8 +487,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDurationConstraint_2110Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDurationConstraint_2110OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDurationConstraint_2110OutgoingLinks(view));
}
/**
@@ -553,8 +495,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeConstraint_2111Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeConstraint_2111OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeConstraint_2111OutgoingLinks(view));
}
/**
@@ -562,8 +503,7 @@ public class UMLDiagramContentInitializer {
*/
private void createIntervalConstraint_2112Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getIntervalConstraint_2112OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getIntervalConstraint_2112OutgoingLinks(view));
}
/**
@@ -571,8 +511,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInteractionConstraint_2113Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInteractionConstraint_2113OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInteractionConstraint_2113OutgoingLinks(view));
}
/**
@@ -580,8 +519,7 @@ public class UMLDiagramContentInitializer {
*/
private void createConstraint_2114Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_2114OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getConstraint_2114OutgoingLinks(view));
}
/**
@@ -589,8 +527,7 @@ public class UMLDiagramContentInitializer {
*/
private void createPort_3069Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getPort_3069OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getPort_3069OutgoingLinks(view));
}
/**
@@ -598,8 +535,7 @@ public class UMLDiagramContentInitializer {
*/
private void createParameter_3088Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getParameter_3088OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getParameter_3088OutgoingLinks(view));
}
/**
@@ -607,12 +543,10 @@ public class UMLDiagramContentInitializer {
*/
private void createProperty_3070Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getProperty_3070OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getProperty_3070SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getProperty_3070OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getProperty_3070SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createPropertyInternalstructure_7077Children(getCompartment(view, PropertyPartCompartmentEditPartCN.VISUAL_ID));
}
@@ -622,8 +556,7 @@ public class UMLDiagramContentInitializer {
*/
private void createConnectableElement_3115Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getConnectableElement_3115OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getConnectableElement_3115OutgoingLinks(view));
}
/**
@@ -631,8 +564,7 @@ public class UMLDiagramContentInitializer {
*/
private void createCollaborationUse_3071Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getCollaborationUse_3071OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getCollaborationUse_3071OutgoingLinks(view));
}
/**
@@ -640,12 +572,10 @@ public class UMLDiagramContentInitializer {
*/
private void createActivity_3072Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getActivity_3072OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getActivity_3072SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getActivity_3072OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getActivity_3072SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createActivityInternalstructure_7050Children(getCompartment(view, ActivityCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -655,12 +585,10 @@ public class UMLDiagramContentInitializer {
*/
private void createInteraction_3073Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInteraction_3073OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getInteraction_3073SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInteraction_3073OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getInteraction_3073SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createInteractionInternalstructure_7051Children(getCompartment(view, InteractionCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -670,12 +598,10 @@ public class UMLDiagramContentInitializer {
*/
private void createProtocolStateMachine_3074Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachine_3074OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachine_3074SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getProtocolStateMachine_3074OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getProtocolStateMachine_3074SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createProtocolStateMachineInternalstructure_7052Children(getCompartment(view, ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -685,12 +611,10 @@ public class UMLDiagramContentInitializer {
*/
private void createStateMachine_3075Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getStateMachine_3075OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getStateMachine_3075SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getStateMachine_3075OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getStateMachine_3075SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createStateMachineInternalstructure_7053Children(getCompartment(view, StateMachineCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -700,12 +624,10 @@ public class UMLDiagramContentInitializer {
*/
private void createFunctionBehavior_3076Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getFunctionBehavior_3076OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getFunctionBehavior_3076SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getFunctionBehavior_3076OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getFunctionBehavior_3076SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createFunctionBehaviorInternalstructure_7054Children(getCompartment(view, FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -715,12 +637,10 @@ public class UMLDiagramContentInitializer {
*/
private void createOpaqueBehavior_3077Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getOpaqueBehavior_3077OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getOpaqueBehavior_3077SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getOpaqueBehavior_3077OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getOpaqueBehavior_3077SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createOpaqueBehaviorInternalstructure_7055Children(getCompartment(view, OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -730,12 +650,10 @@ public class UMLDiagramContentInitializer {
*/
private void createComponent_3081Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getComponent_3081OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponent_3081SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getComponent_3081OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getComponent_3081SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createComponentInternalstructure_7056Children(getCompartment(view, ComponentCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -745,12 +663,10 @@ public class UMLDiagramContentInitializer {
*/
private void createDevice_3082Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDevice_3082OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDevice_3082SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDevice_3082OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDevice_3082SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createDeviceInternalstructure_7057Children(getCompartment(view, DeviceCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -760,12 +676,10 @@ public class UMLDiagramContentInitializer {
*/
private void createExecutionEnvironment_3083Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_3083OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_3083SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getExecutionEnvironment_3083OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getExecutionEnvironment_3083SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createExecutionEnvironmentInternalstructure_7058Children(getCompartment(view, ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -775,12 +689,10 @@ public class UMLDiagramContentInitializer {
*/
private void createNode_3084Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getNode_3084OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getNode_3084SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getNode_3084OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getNode_3084SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createNodeInternalstructure_7059Children(getCompartment(view, NodeCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -790,12 +702,10 @@ public class UMLDiagramContentInitializer {
*/
private void createClass_3085Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getClass_3085OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getClass_3085SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getClass_3085OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getClass_3085SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createClassInternalstructure_7060Children(getCompartment(view, ClassCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -805,8 +715,7 @@ public class UMLDiagramContentInitializer {
*/
private void createCollaboration_3086Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getCollaboration_3086OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getCollaboration_3086OutgoingLinks(view));
createCollaborationInternalstructure_7061Children(getCompartment(view, CollaborationCompositeCompartmentEditPartCN.VISUAL_ID));
}
@@ -815,8 +724,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInterface_3087Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInterface_3087OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInterface_3087OutgoingLinks(view));
}
/**
@@ -824,8 +732,7 @@ public class UMLDiagramContentInitializer {
*/
private void createPrimitiveType_3078Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getPrimitiveType_3078OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getPrimitiveType_3078OutgoingLinks(view));
}
/**
@@ -833,12 +740,10 @@ public class UMLDiagramContentInitializer {
*/
private void createEnumeration_3079Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getEnumeration_3079OutgoingLinks(view));
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getEnumeration_3079SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getEnumeration_3079OutgoingLinks(view));
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getEnumeration_3079SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
createEnumerationLiterals_7049Children(getCompartment(view, EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID));
}
@@ -848,8 +753,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDataType_3080Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDataType_3080OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDataType_3080OutgoingLinks(view));
createDataTypeAttributes_7036Children(getCompartment(view, DataTypeAttributeCompartmentEditPartCN.VISUAL_ID));
createDataTypeOperations_7037Children(getCompartment(view, DataTypeOperationCompartmentEditPartCN.VISUAL_ID));
}
@@ -859,8 +763,7 @@ public class UMLDiagramContentInitializer {
*/
private void createActor_3091Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getActor_3091OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getActor_3091OutgoingLinks(view));
}
/**
@@ -868,8 +771,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDeploymentSpecification_3092Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDeploymentSpecification_3092OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDeploymentSpecification_3092OutgoingLinks(view));
}
/**
@@ -877,8 +779,7 @@ public class UMLDiagramContentInitializer {
*/
private void createArtifact_3093Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_3093OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getArtifact_3093OutgoingLinks(view));
}
/**
@@ -886,8 +787,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInformationItem_3094Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInformationItem_3094OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInformationItem_3094OutgoingLinks(view));
}
/**
@@ -895,8 +795,7 @@ public class UMLDiagramContentInitializer {
*/
private void createSignal_3095Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getSignal_3095OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getSignal_3095OutgoingLinks(view));
}
/**
@@ -904,8 +803,7 @@ public class UMLDiagramContentInitializer {
*/
private void createUseCase_3096Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getUseCase_3096OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getUseCase_3096OutgoingLinks(view));
}
/**
@@ -913,8 +811,7 @@ public class UMLDiagramContentInitializer {
*/
private void createComment_3097Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_3097OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getComment_3097OutgoingLinks(view));
}
/**
@@ -922,8 +819,7 @@ public class UMLDiagramContentInitializer {
*/
private void createDurationConstraint_3116Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDurationConstraint_3116OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDurationConstraint_3116OutgoingLinks(view));
}
/**
@@ -931,8 +827,7 @@ public class UMLDiagramContentInitializer {
*/
private void createTimeConstraint_3117Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getTimeConstraint_3117OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getTimeConstraint_3117OutgoingLinks(view));
}
/**
@@ -940,8 +835,7 @@ public class UMLDiagramContentInitializer {
*/
private void createIntervalConstraint_3118Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getIntervalConstraint_3118OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getIntervalConstraint_3118OutgoingLinks(view));
}
/**
@@ -949,8 +843,7 @@ public class UMLDiagramContentInitializer {
*/
private void createInteractionConstraint_3119Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInteractionConstraint_3119OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInteractionConstraint_3119OutgoingLinks(view));
}
/**
@@ -958,8 +851,7 @@ public class UMLDiagramContentInitializer {
*/
private void createConstraint_3120Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_3120OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getConstraint_3120OutgoingLinks(view));
}
/**
@@ -967,8 +859,7 @@ public class UMLDiagramContentInitializer {
*/
private void createProperty_3101Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getProperty_3101OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getProperty_3101OutgoingLinks(view));
}
/**
@@ -976,8 +867,7 @@ public class UMLDiagramContentInitializer {
*/
private void createOperation_3102Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getOperation_3102OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getOperation_3102OutgoingLinks(view));
}
/**
@@ -985,18 +875,16 @@ public class UMLDiagramContentInitializer {
*/
private void createEnumerationLiteral_3066Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
- myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getEnumerationLiteral_3066OutgoingLinks(view));
+ myLinkDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getEnumerationLiteral_3066OutgoingLinks(view));
}
/**
* @generated
*/
private void createDataTypeAttributes_7033Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDataTypeAttributes_7033SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDataTypeAttributes_7033SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1004,10 +892,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createDataTypeOperations_7034Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDataTypeOperations_7034SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDataTypeOperations_7034SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1015,10 +902,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createDataTypeAttributes_7036Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDataTypeAttributes_7036SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDataTypeAttributes_7036SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1026,10 +912,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createDataTypeOperations_7037Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDataTypeOperations_7037SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDataTypeOperations_7037SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1037,10 +922,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createEnumerationLiterals_7048Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getEnumerationLiterals_7048SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getEnumerationLiterals_7048SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1048,10 +932,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createEnumerationLiterals_7049Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getEnumerationLiterals_7049SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getEnumerationLiterals_7049SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1059,10 +942,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createActivityInternalstructure_7050Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getActivityInternalstructure_7050SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getActivityInternalstructure_7050SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1070,10 +952,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createInteractionInternalstructure_7051Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getInteractionInternalstructure_7051SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getInteractionInternalstructure_7051SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1081,10 +962,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createProtocolStateMachineInternalstructure_7052Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachineInternalstructure_7052SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getProtocolStateMachineInternalstructure_7052SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1092,10 +972,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createStateMachineInternalstructure_7053Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getStateMachineInternalstructure_7053SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getStateMachineInternalstructure_7053SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1103,10 +982,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createFunctionBehaviorInternalstructure_7054Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getFunctionBehaviorInternalstructure_7054SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getFunctionBehaviorInternalstructure_7054SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1114,10 +992,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createOpaqueBehaviorInternalstructure_7055Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getOpaqueBehaviorInternalstructure_7055SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getOpaqueBehaviorInternalstructure_7055SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1125,10 +1002,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createComponentInternalstructure_7056Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponentInternalstructure_7056SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getComponentInternalstructure_7056SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1136,10 +1012,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createDeviceInternalstructure_7057Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDeviceInternalstructure_7057SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDeviceInternalstructure_7057SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1147,10 +1022,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createExecutionEnvironmentInternalstructure_7058Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentInternalstructure_7058SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getExecutionEnvironmentInternalstructure_7058SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1158,10 +1032,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createNodeInternalstructure_7059Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getNodeInternalstructure_7059SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getNodeInternalstructure_7059SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1169,10 +1042,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createClassInternalstructure_7060Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getClassInternalstructure_7060SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getClassInternalstructure_7060SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1180,10 +1052,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createCollaborationInternalstructure_7061Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getCollaborationInternalstructure_7061SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getCollaborationInternalstructure_7061SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1191,10 +1062,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createActivityInternalstructure_7063Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getActivityInternalstructure_7063SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getActivityInternalstructure_7063SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1202,10 +1072,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createInteractionInternalstructure_7064Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getInteractionInternalstructure_7064SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getInteractionInternalstructure_7064SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1213,10 +1082,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createProtocolStateMachineInternalstructure_7065Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getProtocolStateMachineInternalstructure_7065SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getProtocolStateMachineInternalstructure_7065SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1224,10 +1092,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createStateMachineInternalstructure_7066Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getStateMachineInternalstructure_7066SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getStateMachineInternalstructure_7066SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1235,10 +1102,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createFunctionBehaviorInternalstructure_7067Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getFunctionBehaviorInternalstructure_7067SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getFunctionBehaviorInternalstructure_7067SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1246,10 +1112,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createOpaqueBehaviorInternalstructure_7068Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getOpaqueBehaviorInternalstructure_7068SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getOpaqueBehaviorInternalstructure_7068SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1257,10 +1122,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createComponentInternalstructure_7069Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getComponentInternalstructure_7069SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getComponentInternalstructure_7069SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1268,10 +1132,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createDeviceInternalstructure_7070Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getDeviceInternalstructure_7070SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getDeviceInternalstructure_7070SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1279,10 +1142,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createExecutionEnvironmentInternalstructure_7071Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentInternalstructure_7071SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getExecutionEnvironmentInternalstructure_7071SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1290,10 +1152,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createNodeInternalstructure_7072Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getNodeInternalstructure_7072SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getNodeInternalstructure_7072SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1301,10 +1162,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createClassInternalstructure_7073Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getClassInternalstructure_7073SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getClassInternalstructure_7073SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1312,10 +1172,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createCollaborationInternalstructure_7075Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getCollaborationInternalstructure_7075SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getCollaborationInternalstructure_7075SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1323,10 +1182,9 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createPropertyInternalstructure_7077Children(View view) {
- Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE
- .getPropertyInternalstructure_7077SemanticChildren(view);
- for (Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
- createNode(view, (UMLNodeDescriptor) it.next());
+ Collection childNodeDescriptors = UMLDiagramUpdater.INSTANCE.getPropertyInternalstructure_7077SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
}
}
@@ -1336,7 +1194,7 @@ public class UMLDiagramContentInitializer {
private void createNode(View parentView, UMLNodeDescriptor nodeDescriptor) {
final String nodeType = UMLVisualIDRegistry.getType(nodeDescriptor.getVisualID());
Node node = ViewService.createNode(parentView, nodeDescriptor.getModelElement(), nodeType, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- switch (nodeDescriptor.getVisualID()) {
+ switch(nodeDescriptor.getVisualID()) {
case ActivityCompositeEditPart.VISUAL_ID:
createActivity_2060Children(node);
return;
@@ -1599,76 +1457,63 @@ public class UMLDiagramContentInitializer {
* @generated
*/
private void createLinks(Diagram diagram) {
- for (boolean continueLinkCreation = true; continueLinkCreation;) {
+ for(boolean continueLinkCreation = true; continueLinkCreation;) {
continueLinkCreation = false;
Collection additionalDescriptors = new LinkedList();
- for (Iterator it = myLinkDescriptors.iterator(); it.hasNext();) {
- UMLLinkDescriptor nextLinkDescriptor = (UMLLinkDescriptor) it.next();
- if (!myDomain2NotationMap.containsKey(nextLinkDescriptor.getSource()) || !myDomain2NotationMap.containsKey(nextLinkDescriptor.getDestination())) {
+ for(Iterator it = myLinkDescriptors.iterator(); it.hasNext();) {
+ UMLLinkDescriptor nextLinkDescriptor = (UMLLinkDescriptor)it.next();
+ if(!myDomain2NotationMap.containsKey(nextLinkDescriptor.getSource()) || !myDomain2NotationMap.containsKey(nextLinkDescriptor.getDestination())) {
continue;
}
final String linkType = UMLVisualIDRegistry.getType(nextLinkDescriptor.getVisualID());
Edge edge = ViewService.getInstance().createEdge(nextLinkDescriptor.getSemanticAdapter(), diagram, linkType, ViewUtil.APPEND, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- if (edge != null) {
- edge.setSource((View) myDomain2NotationMap.get(nextLinkDescriptor.getSource()));
- edge.setTarget((View) myDomain2NotationMap.get(nextLinkDescriptor.getDestination()));
+ if(edge != null) {
+ edge.setSource((View)myDomain2NotationMap.get(nextLinkDescriptor.getSource()));
+ edge.setTarget((View)myDomain2NotationMap.get(nextLinkDescriptor.getDestination()));
it.remove();
- if (nextLinkDescriptor.getModelElement() != null) {
+ if(nextLinkDescriptor.getModelElement() != null) {
myDomain2NotationMap.put(nextLinkDescriptor.getModelElement(), edge);
}
continueLinkCreation = true;
- switch (nextLinkDescriptor.getVisualID()) {
+ switch(nextLinkDescriptor.getVisualID()) {
case ComponentRealizationEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getComponentRealization_4004OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getComponentRealization_4004OutgoingLinks(edge));
break;
case InterfaceRealizationEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInterfaceRealization_4005OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInterfaceRealization_4005OutgoingLinks(edge));
break;
case SubstitutionEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getSubstitution_4011OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getSubstitution_4011OutgoingLinks(edge));
break;
case RealizationEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getRealization_4006OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getRealization_4006OutgoingLinks(edge));
break;
case ManifestationEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getManifestation_4012OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getManifestation_4012OutgoingLinks(edge));
break;
case AbstractionEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getAbstraction_4007OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getAbstraction_4007OutgoingLinks(edge));
break;
case UsageEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getUsage_4008OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getUsage_4008OutgoingLinks(edge));
break;
case DeploymentEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDeployment_4009OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDeployment_4009OutgoingLinks(edge));
break;
case RoleBindingEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4017OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDependency_4017OutgoingLinks(edge));
break;
case DependencyEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4010OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getDependency_4010OutgoingLinks(edge));
break;
case ConnectorEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getConnector_4013OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getConnector_4013OutgoingLinks(edge));
break;
case GeneralizationEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getGeneralization_4015OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getGeneralization_4015OutgoingLinks(edge));
break;
case InformationFlowEditPart.VISUAL_ID:
- additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE
- .getInformationFlow_4021OutgoingLinks(edge));
+ additionalDescriptors.addAll(UMLDiagramUpdater.INSTANCE.getInformationFlow_4021OutgoingLinks(edge));
break;
}
}
@@ -1682,10 +1527,10 @@ public class UMLDiagramContentInitializer {
*/
private Node getCompartment(View node, int visualID) {
String type = UMLVisualIDRegistry.getType(visualID);
- for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
- View nextView = (View) it.next();
- if (nextView instanceof Node && type.equals(nextView.getType())) {
- return (Node) nextView;
+ for(Iterator it = node.getChildren().iterator(); it.hasNext();) {
+ View nextView = (View)it.next();
+ if(nextView instanceof Node && type.equals(nextView.getType())) {
+ return (Node)nextView;
}
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java
index 1998192cee7..2af9285d2a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -102,23 +102,18 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
public UMLDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
super(servicesRegistry, diagram);
-
// adds a listener to the palette service, which reacts to palette customizations
PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
// Share the same editing provider
editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
// overrides editing domain created by super constructor
setDocumentProvider(documentProvider);
-
}
/**
* @generated
*/
- @Override
protected String getContextID() {
return CONTEXT_ID;
}
@@ -126,10 +121,9 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
PaletteRoot paletteRoot;
- if (existingPaletteRoot == null) {
+ if(existingPaletteRoot == null) {
paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
} else {
PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
@@ -142,7 +136,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PreferencesHint getPreferencesHint() {
return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
}
@@ -150,7 +143,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public String getContributorId() {
return UMLDiagramEditorPlugin.ID;
}
@@ -158,7 +150,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
return documentProvider;
}
@@ -166,7 +157,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public TransactionalEditingDomain getEditingDomain() {
return editingDomain;
}
@@ -174,7 +164,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected final void setDocumentProvider(IEditorInput input) {
// Already set in the constructor
}
@@ -182,7 +171,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void gotoMarker(IMarker marker) {
MarkerNavigationService.getInstance().gotoMarker(this, marker);
}
@@ -190,7 +178,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public boolean isSaveAsAllowed() {
return true;
}
@@ -198,7 +185,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void doSaveAs() {
performSaveAs(new NullProgressMonitor());
}
@@ -206,7 +192,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void performSaveAs(IProgressMonitor progressMonitor) {
// Nothing
}
@@ -214,7 +199,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public ShowInContext getShowInContext() {
return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
}
@@ -222,11 +206,9 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
- DiagramEditorContextMenuProvider provider =
- new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
+ DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
getDiagramGraphicalViewer().setContextMenu(provider);
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
}
@@ -234,7 +216,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected TransactionalEditingDomain createEditingDomain() {
// Already configured
return editingDomain;
@@ -243,7 +224,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void configureDiagramEditDomain() {
super.configureDiagramEditDomain();
getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
@@ -258,7 +238,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void doSave(IProgressMonitor progressMonitor) {
// The saving of the resource is done by the CoreMultiDiagramEditor
getDirtyState().saved();
@@ -268,7 +247,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @generated
*/
protected OperationHistoryDirtyState getDirtyState() {
- if (dirtyState == null) {
+ if(dirtyState == null) {
dirtyState = OperationHistoryDirtyState.newInstance(getUndoContext(), getOperationHistory());
}
return dirtyState;
@@ -277,20 +256,17 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void setUndoContext(IUndoContext context) {
- if (dirtyState != null) {
+ if(dirtyState != null) {
dirtyState.dispose();
dirtyState = null;
}
-
super.setUndoContext(context);
}
/**
* @generated
*/
- @Override
public boolean isDirty() {
return getDirtyState().isDirty();
}
@@ -298,29 +274,24 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @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());
+ 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) {
+ if(dirtyState != null) {
dirtyState.dispose();
dirtyState = null;
}
-
super.dispose();
}
@@ -334,7 +305,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteViewer constructPaletteViewer() {
return new PapyrusPaletteViewer();
}
@@ -342,7 +312,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteViewerProvider createPaletteViewerProvider() {
getEditDomain().setPaletteRoot(createPaletteRoot(null));
return new PaletteViewerProvider(getEditDomain()) {
@@ -357,13 +326,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
@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
@@ -385,9 +351,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @return Palette Key Handler for the palette
*/
private KeyHandler getPaletteKeyHandler() {
-
- if (paletteKeyHandler == null) {
-
+ if(paletteKeyHandler == null) {
paletteKeyHandler = new KeyHandler() {
/**
@@ -395,34 +359,25 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* 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) {
-
+ if(event.keyCode == SWT.Selection) {
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if (toolSupportsAccessibility(tool)) {
-
+ if(toolSupportsAccessibility(tool)) {
tool.keyUp(event, getDiagramGraphicalViewer());
-
// deactivate current selection
getPaletteViewer().setActiveTool(null);
-
return true;
}
-
}
return super.keyReleased(event);
}
-
};
-
}
return paletteKeyHandler;
}
@@ -431,9 +386,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @return Palette Mouse listener for the palette
*/
private MouseListener getPaletteMouseListener() {
-
- if (paletteMouseListener == null) {
-
+ if(paletteMouseListener == null) {
paletteMouseListener = new MouseListener() {
/**
@@ -445,19 +398,16 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* 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)) {
-
+ 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
@@ -475,18 +425,15 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
public void mouseUp(MouseEvent e) {
// Deactivate current active tool here if a
// double-click was handled.
- if (clearActiveTool) {
+ if(clearActiveTool) {
getPaletteViewer().setActiveTool(null);
clearActiveTool = false;
}
-
}
};
-
}
return paletteMouseListener;
}
-
};
}
@@ -504,23 +451,20 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
@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();
- }
+ getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
+ @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();
+ }
+ });
}
/**
@@ -528,10 +472,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if (getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor) getSite().getPage().getActiveEditor();
+ 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())) {
+ if(this.equals(editor.getActiveEditor())) {
updateActions(getSelectionActions());
super.selectionChanged(part, selection);
} else {
@@ -543,7 +487,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
// from
// org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
// ISelection)
- if (part == this) {
+ if(part == this) {
rebuildStatusLine();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java
index 0fd9d3efcc9..85e3758211e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java
@@ -1,14 +1,13 @@
/**
- * Copyright (c) 2014 CEA LIST and others.
- *
+ * Copyright (c) 2014 CEA LIST.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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.composite.part;
@@ -22,7 +21,7 @@ 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.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.preferences.DiagramPreferenceInitializer;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
@@ -84,22 +83,19 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* @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();
+ adapterFactory = Activator.getInstance().getItemProvidersAdapterFactory();
DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
diagramPreferenceInitializer.initializeDefaultPreferences();
-
}
/**
* @generated
*/
- @Override
public void stop(BundleContext context) throws Exception {
adapterFactory = null;
linkConstraints = null;
@@ -118,9 +114,8 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* @generated
*/
- @Override
public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
return store;
}
@@ -135,12 +130,9 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
* @generated
*/
public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider =
- (IItemLabelProvider) adapterFactory.adapt(
- item, IItemLabelProvider.class);
- if (labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(
- labelProvider.getImage(item));
+ IItemLabelProvider labelProvider = (IItemLabelProvider)adapterFactory.adapt(item, IItemLabelProvider.class);
+ if(labelProvider != null) {
+ return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
}
return null;
}
@@ -148,10 +140,9 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* Returns an image descriptor for the image file at the given
* plug-in relative path.
- *
+ *
* @generated
- * @param path
- * the path
+ * @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getBundledImageDescriptor(String path) {
@@ -162,17 +153,15 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
* 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
+ * @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());
+ if(p.isAbsolute() && p.segmentCount() > 1) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
} else {
return getBundledImageDescriptor(p.makeAbsolute().toString());
}
@@ -181,15 +170,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* 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
+ * @param path the path
* @return image instance
*/
public Image getBundledImage(String path) {
Image image = getImageRegistry().get(path);
- if (image == null) {
+ if(image == null) {
getImageRegistry().put(path, getBundledImageDescriptor(path));
image = getImageRegistry().get(path);
}
@@ -198,19 +186,18 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* Returns string from plug-in's resource bundle
- *
+ *
* @generated
*/
public static String getString(String key) {
- return Platform.getResourceString(
- getInstance().getBundle(), "%" + key); //$NON-NLS-1$
+ return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
}
/**
* @generated
*/
public UMLDocumentProvider getDocumentProvider() {
- if (documentProvider == null) {
+ if(documentProvider == null) {
documentProvider = new UMLDocumentProvider();
}
return documentProvider;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java
index 258995ef886..a7e17ba0c92 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -85,9 +85,9 @@ public class UMLDiagramEditorUtil {
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) {
+ if(workspaceResource instanceof IFile) {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new FileEditorInput((IFile) workspaceResource), UMLDiagramEditor.ID);
+ return null != page.openEditor(new FileEditorInput((IFile)workspaceResource), UMLDiagramEditor.ID);
}
return false;
}
@@ -96,7 +96,7 @@ public class UMLDiagramEditorUtil {
* @generated
*/
public static void setCharset(IFile file) {
- if (file == null) {
+ if(file == null) {
return;
}
try {
@@ -110,19 +110,18 @@ public class UMLDiagramEditorUtil {
* @generated
*/
public static String getUniqueFileName(IPath containerFullPath, String fileName, String extension) {
- return DefaultDiagramEditorUtil.getUniqueFileName(containerFullPath, fileName, extension,
- DefaultDiagramEditorUtil.EXISTS_IN_WORKSPACE);
+ 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) {
+ if(wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
}
wizard.setDialogSettings(wizardDialogSettings);
@@ -134,7 +133,6 @@ public class UMLDiagramEditorUtil {
/**
* 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) {
@@ -144,25 +142,21 @@ public class UMLDiagramEditorUtil {
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,
- CompositeStructureDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- if (diagram != null) {
+ Diagram diagram = ViewService.createDiagram(model, CompositeStructureDiagramEditPart.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.composite.part.UMLDiagramEditorUtil.getSaveOptions());
diagramResource.save(org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
-
UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
}
return CommandResult.newOKCommandResult();
@@ -182,7 +176,6 @@ 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,7 +186,6 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
@@ -205,17 +197,15 @@ public class UMLDiagramEditorUtil {
*/
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
diagramPart.getDiagramGraphicalViewer().deselectAll();
-
EditPart firstPrimary = null;
- for (EditPart nextPart : editParts) {
+ for(EditPart nextPart : editParts) {
diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
- if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
+ if(firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
firstPrimary = nextPart;
}
}
-
- if (!editParts.isEmpty()) {
- diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
+ if(!editParts.isEmpty()) {
+ diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart)editParts.get(0));
}
}
@@ -223,36 +213,33 @@ public class UMLDiagramEditorUtil {
* @generated
*/
private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
- IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer) diagramPart.getViewer();
+ 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) {
+ 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) {
+ for(EditPart nextPart : associatedParts) {
EditPart parentPart = nextPart.getParent();
- while (parentPart != null && !associatedParts.contains(parentPart)) {
+ while(parentPart != null && !associatedParts.contains(parentPart)) {
parentPart = parentPart.getParent();
}
- if (parentPart == null) {
+ if(parentPart == null) {
editPartCollector.add(nextPart);
}
}
-
- if (intialNumOfEditParts == editPartCollector.size()) {
- if (!associatedParts.isEmpty()) {
+ if(intialNumOfEditParts == editPartCollector.size()) {
+ if(!associatedParts.isEmpty()) {
editPartCollector.add(associatedParts.get(0));
} else {
- if (element.eContainer() != null) {
+ if(element.eContainer() != null) {
return findElementsInDiagramByID(diagramPart, element.eContainer(), editPartCollector);
}
}
@@ -265,25 +252,22 @@ public class UMLDiagramEditorUtil {
*/
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;
+ 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()) {
+ if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
view = lazyElement2ViewMap.getElement2ViewMap().get(targetElement);
- } else if (findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
+ } else if(findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
EditPart editPart = editPartHolder.get(0);
- view = editPart.getModel() instanceof View ? (View) editPart.getModel() : null;
+ 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 {
@@ -315,18 +299,17 @@ public class UMLDiagramEditorUtil {
* @generated
*/
public final Map<EObject, View> getElement2ViewMap() {
- if (element2ViewMap == null) {
+ 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()) {
+ 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;
@@ -336,27 +319,26 @@ public class UMLDiagramEditorUtil {
* @generated
*/
private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap, Set<? extends EObject> elements) {
- if (elements.size() == element2ViewMap.size()) {
+ if(elements.size() == element2ViewMap.size()) {
return true;
}
-
- if (parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
+ if(parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
element2ViewMap.put(parentView.getElement(), parentView);
- if (elements.size() == element2ViewMap.size()) {
+ 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.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.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);
+ for(Iterator<?> it = parentView.getTargetEdges().iterator(); it.hasNext() && !complete;) {
+ complete = buildElement2ViewMap((View)it.next(), element2ViewMap, elements);
}
return complete;
}
- } // LazyElement2ViewMap
+ } //LazyElement2ViewMap
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdater.java
index f5da0f844fa..fac5229247b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdater.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -117,15 +117,14 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- // to prevent instantiation allowing the override
+ //to prevent instantiation allowing the override
}
/**
* @generated
*/
- @Override
public List<UMLNodeDescriptor> getSemanticChildren(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
+ switch(UMLVisualIDRegistry.getVisualID(view)) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
return getPackage_1000SemanticChildren(view);
case ActivityCompositeEditPart.VISUAL_ID:
@@ -248,218 +247,215 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getPackage_1000SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Package modelElement = (Package) view.getElement();
+ Package modelElement = (Package)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
+ for(Iterator<?> it = modelElement.getPackagedElements().iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPart.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPart.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPart.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPart.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPart.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPart.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPart.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPart.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPart.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPart.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPart.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPart.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPart.VISUAL_ID) {
+ if(visualID == InterfaceEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPart.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPart.VISUAL_ID) {
+ if(visualID == EnumerationEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPart.VISUAL_ID) {
+ if(visualID == DataTypeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPart.VISUAL_ID) {
+ if(visualID == ActorEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPart.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPart.VISUAL_ID) {
+ if(visualID == ArtifactEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPart.VISUAL_ID) {
+ if(visualID == InformationItemEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPart.VISUAL_ID) {
+ if(visualID == SignalEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPart.VISUAL_ID) {
+ if(visualID == UseCaseEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEventEditPart.VISUAL_ID) {
+ if(visualID == SignalEventEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CallEventEditPart.VISUAL_ID) {
+ if(visualID == CallEventEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == AnyReceiveEventEditPart.VISUAL_ID) {
+ if(visualID == AnyReceiveEventEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ChangeEventEditPart.VISUAL_ID) {
+ if(visualID == ChangeEventEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeEventEditPart.VISUAL_ID) {
+ if(visualID == TimeEventEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DurationObservationEditPart.VISUAL_ID) {
+ if(visualID == DurationObservationEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeObservationEditPart.VISUAL_ID) {
+ if(visualID == TimeObservationEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == LiteralBooleanEditPart.VISUAL_ID) {
+ if(visualID == LiteralBooleanEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == LiteralIntegerEditPart.VISUAL_ID) {
+ if(visualID == LiteralIntegerEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == LiteralNullEditPart.VISUAL_ID) {
+ if(visualID == LiteralNullEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == LiteralStringEditPart.VISUAL_ID) {
+ if(visualID == LiteralStringEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == LiteralUnlimitedNaturalEditPart.VISUAL_ID) {
+ if(visualID == LiteralUnlimitedNaturalEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StringExpressionEditPart.VISUAL_ID) {
+ if(visualID == StringExpressionEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueExpressionEditPart.VISUAL_ID) {
+ if(visualID == OpaqueExpressionEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeExpressionEditPart.VISUAL_ID) {
+ if(visualID == TimeExpressionEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExpressionEditPart.VISUAL_ID) {
+ if(visualID == ExpressionEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DurationEditPart.VISUAL_ID) {
+ if(visualID == DurationEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeIntervalEditPart.VISUAL_ID) {
+ if(visualID == TimeIntervalEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DurationIntervalEditPart.VISUAL_ID) {
+ if(visualID == DurationIntervalEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalEditPart.VISUAL_ID) {
+ if(visualID == IntervalEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InstanceValueEditPart.VISUAL_ID) {
+ if(visualID == InstanceValueEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPart.VISUAL_ID) {
+ if(visualID == CommentEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPart.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPart.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPart.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPart.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPart.VISUAL_ID) {
+ if(visualID == ConstraintEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -471,25 +467,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getActivity_2060SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -501,25 +495,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getInteraction_2061SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -531,25 +523,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getProtocolStateMachine_2062SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -561,25 +551,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getStateMachine_2063SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -591,25 +579,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getFunctionBehavior_2064SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -621,25 +607,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getOpaqueBehavior_2065SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -651,16 +635,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getComponent_2069SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -672,16 +655,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDevice_2070SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -693,16 +675,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getExecutionEnvironment_2071SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -714,16 +695,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getNode_2072SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -735,16 +715,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getClass_2073SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -756,16 +735,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getEnumeration_2067SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedLiterals()
- .iterator(); it.hasNext();) {
- EnumerationLiteral childElement = (EnumerationLiteral) it.next();
+ for(Iterator<?> it = modelElement.getOwnedLiterals().iterator(); it.hasNext();) {
+ EnumerationLiteral childElement = (EnumerationLiteral)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
+ if(visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -785,25 +763,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getActivity_3072SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -815,25 +791,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getInteraction_3073SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -845,25 +819,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getProtocolStateMachine_3074SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -875,25 +847,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getStateMachine_3075SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -905,25 +875,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getFunctionBehavior_3076SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -935,25 +903,23 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getOpaqueBehavior_3077SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -965,16 +931,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getComponent_3081SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -986,16 +951,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDevice_3082SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1007,16 +971,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getExecutionEnvironment_3083SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1028,16 +991,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getNode_3084SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1049,16 +1011,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getClass_3085SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PortEditPart.VISUAL_ID) {
+ if(visualID == PortEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1070,16 +1031,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getEnumeration_3079SemanticChildren(View view) {
- if (!view.isSetElement()) {
+ if(!view.isSetElement()) {
return Collections.emptyList();
}
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedLiterals()
- .iterator(); it.hasNext();) {
- EnumerationLiteral childElement = (EnumerationLiteral) it.next();
+ for(Iterator<?> it = modelElement.getOwnedLiterals().iterator(); it.hasNext();) {
+ EnumerationLiteral childElement = (EnumerationLiteral)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
+ if(visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1091,20 +1051,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDataTypeAttributes_7033SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- DataType modelElement = (DataType) containerView.getElement();
+ DataType modelElement = (DataType)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyEditPartCLN.VISUAL_ID) {
+ if(visualID == PropertyEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1116,20 +1075,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDataTypeOperations_7034SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- DataType modelElement = (DataType) containerView.getElement();
+ DataType modelElement = (DataType)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedOperations()
- .iterator(); it.hasNext();) {
- Operation childElement = (Operation) it.next();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == OperationEditPartCLN.VISUAL_ID) {
+ if(visualID == OperationEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1141,20 +1099,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDataTypeAttributes_7036SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- DataType modelElement = (DataType) containerView.getElement();
+ DataType modelElement = (DataType)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyEditPartCLN.VISUAL_ID) {
+ if(visualID == PropertyEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1166,20 +1123,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDataTypeOperations_7037SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- DataType modelElement = (DataType) containerView.getElement();
+ DataType modelElement = (DataType)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedOperations()
- .iterator(); it.hasNext();) {
- Operation childElement = (Operation) it.next();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == OperationEditPartCLN.VISUAL_ID) {
+ if(visualID == OperationEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1191,20 +1147,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getEnumerationLiterals_7048SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Enumeration modelElement = (Enumeration) containerView.getElement();
+ Enumeration modelElement = (Enumeration)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedLiterals()
- .iterator(); it.hasNext();) {
- EnumerationLiteral childElement = (EnumerationLiteral) it.next();
+ for(Iterator<?> it = modelElement.getOwnedLiterals().iterator(); it.hasNext();) {
+ EnumerationLiteral childElement = (EnumerationLiteral)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
+ if(visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1216,20 +1171,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getEnumerationLiterals_7049SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Enumeration modelElement = (Enumeration) containerView.getElement();
+ Enumeration modelElement = (Enumeration)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedLiterals()
- .iterator(); it.hasNext();) {
- EnumerationLiteral childElement = (EnumerationLiteral) it.next();
+ for(Iterator<?> it = modelElement.getOwnedLiterals().iterator(); it.hasNext();) {
+ EnumerationLiteral childElement = (EnumerationLiteral)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
+ if(visualID == EnumerationLiteralEditPartCLN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1241,165 +1195,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getActivityInternalstructure_7050SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Activity modelElement = (Activity) containerView.getElement();
+ Activity modelElement = (Activity)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1411,165 +1359,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getInteractionInternalstructure_7051SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Interaction modelElement = (Interaction) containerView.getElement();
+ Interaction modelElement = (Interaction)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1581,165 +1523,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getProtocolStateMachineInternalstructure_7052SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- ProtocolStateMachine modelElement = (ProtocolStateMachine) containerView.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1751,165 +1687,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getStateMachineInternalstructure_7053SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- StateMachine modelElement = (StateMachine) containerView.getElement();
+ StateMachine modelElement = (StateMachine)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -1921,165 +1851,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getFunctionBehaviorInternalstructure_7054SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- FunctionBehavior modelElement = (FunctionBehavior) containerView.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2091,165 +2015,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getOpaqueBehaviorInternalstructure_7055SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- OpaqueBehavior modelElement = (OpaqueBehavior) containerView.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2261,156 +2179,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getComponentInternalstructure_7056SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Component modelElement = (Component) containerView.getElement();
+ Component modelElement = (Component)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2422,156 +2335,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDeviceInternalstructure_7057SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Device modelElement = (Device) containerView.getElement();
+ Device modelElement = (Device)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2583,156 +2491,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getExecutionEnvironmentInternalstructure_7058SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2744,156 +2647,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getNodeInternalstructure_7059SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Node modelElement = (Node) containerView.getElement();
+ Node modelElement = (Node)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -2905,156 +2803,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getClassInternalstructure_7060SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Class modelElement = (Class) containerView.getElement();
+ Class modelElement = (Class)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3066,72 +2959,67 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getCollaborationInternalstructure_7061SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Collaboration modelElement = (Collaboration) containerView.getElement();
+ Collaboration modelElement = (Collaboration)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getRoles()
- .iterator(); it.hasNext();) {
- ConnectableElement childElement = (ConnectableElement) it.next();
+ for(Iterator<?> it = modelElement.getRoles().iterator(); it.hasNext();) {
+ ConnectableElement childElement = (ConnectableElement)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationRoleEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationRoleEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3143,165 +3031,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getActivityInternalstructure_7063SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Activity modelElement = (Activity) containerView.getElement();
+ Activity modelElement = (Activity)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3313,165 +3195,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getInteractionInternalstructure_7064SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Interaction modelElement = (Interaction) containerView.getElement();
+ Interaction modelElement = (Interaction)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3483,165 +3359,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getProtocolStateMachineInternalstructure_7065SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- ProtocolStateMachine modelElement = (ProtocolStateMachine) containerView.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3653,165 +3523,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getStateMachineInternalstructure_7066SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- StateMachine modelElement = (StateMachine) containerView.getElement();
+ StateMachine modelElement = (StateMachine)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3823,165 +3687,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getFunctionBehaviorInternalstructure_7067SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- FunctionBehavior modelElement = (FunctionBehavior) containerView.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -3993,165 +3851,159 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getOpaqueBehaviorInternalstructure_7068SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- OpaqueBehavior modelElement = (OpaqueBehavior) containerView.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedParameters()
- .iterator(); it.hasNext();) {
- Parameter childElement = (Parameter) it.next();
+ for(Iterator<?> it = modelElement.getOwnedParameters().iterator(); it.hasNext();) {
+ Parameter childElement = (Parameter)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ParameterEditPart.VISUAL_ID) {
+ if(visualID == ParameterEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4163,156 +4015,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getComponentInternalstructure_7069SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Component modelElement = (Component) containerView.getElement();
+ Component modelElement = (Component)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4324,156 +4171,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getDeviceInternalstructure_7070SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Device modelElement = (Device) containerView.getElement();
+ Device modelElement = (Device)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4485,156 +4327,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getExecutionEnvironmentInternalstructure_7071SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4646,156 +4483,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getNodeInternalstructure_7072SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Node modelElement = (Node) containerView.getElement();
+ Node modelElement = (Node)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4807,156 +4639,151 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getClassInternalstructure_7073SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Class modelElement = (Class) containerView.getElement();
+ Class modelElement = (Class)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
+ for(Iterator<?> it = modelElement.getNestedClassifiers().iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ActivityCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ProtocolStateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == StateMachineCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == FunctionBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == OpaqueBehaviorCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ComponentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == DeviceCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == NodeCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == NodeCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ClassCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == ClassCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationCompositeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InterfaceEditPartCN.VISUAL_ID) {
+ if(visualID == InterfaceEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == EnumerationEditPartCN.VISUAL_ID) {
+ if(visualID == EnumerationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ActorEditPartCN.VISUAL_ID) {
+ if(visualID == ActorEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
+ if(visualID == DeploymentSpecificationEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ if(visualID == ArtifactEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InformationItemEditPartCN.VISUAL_ID) {
+ if(visualID == InformationItemEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == SignalEditPartCN.VISUAL_ID) {
+ if(visualID == SignalEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == UseCaseEditPartCN.VISUAL_ID) {
+ if(visualID == UseCaseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -4968,72 +4795,67 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getCollaborationInternalstructure_7075SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
+ if(false == view.eContainer() instanceof View) {
return Collections.emptyList();
}
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
return Collections.emptyList();
}
- Collaboration modelElement = (Collaboration) containerView.getElement();
+ Collaboration modelElement = (Collaboration)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOwnedAttributes()
- .iterator(); it.hasNext();) {
- Property childElement = (Property) it.next();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PropertyPartEditPartCN.VISUAL_ID) {
+ if(visualID == PropertyPartEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getCollaborationUses()
- .iterator(); it.hasNext();) {
- CollaborationUse childElement = (CollaborationUse) it.next();
+ for(Iterator<?> it = modelElement.getCollaborationUses().iterator(); it.hasNext();) {
+ CollaborationUse childElement = (CollaborationUse)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationUseEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationUseEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
+ for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
+ if(visualID == CommentEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getRoles()
- .iterator(); it.hasNext();) {
- ConnectableElement childElement = (ConnectableElement) it.next();
+ for(Iterator<?> it = modelElement.getRoles().iterator(); it.hasNext();) {
+ ConnectableElement childElement = (ConnectableElement)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CollaborationRoleEditPartCN.VISUAL_ID) {
+ if(visualID == CollaborationRoleEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
}
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
+ for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DurationConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == DurationConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == TimeConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == TimeConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == IntervalConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == InteractionConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ if(visualID == ConstraintEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -5052,9 +4874,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- @Override
public List<UMLLinkDescriptor> getContainedLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
+ switch(UMLVisualIDRegistry.getVisualID(view)) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
return getPackage_1000ContainedLinks(view);
case ActivityCompositeEditPart.VISUAL_ID:
@@ -5260,9 +5081,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- @Override
public List<UMLLinkDescriptor> getIncomingLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
+ switch(UMLVisualIDRegistry.getVisualID(view)) {
case ActivityCompositeEditPart.VISUAL_ID:
return getActivity_2060IncomingLinks(view);
case InteractionCompositeEditPart.VISUAL_ID:
@@ -5466,9 +5286,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- @Override
public List<UMLLinkDescriptor> getOutgoingLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
+ switch(UMLVisualIDRegistry.getVisualID(view)) {
case ActivityCompositeEditPart.VISUAL_ID:
return getActivity_2060OutgoingLinks(view);
case InteractionCompositeEditPart.VISUAL_ID:
@@ -5673,30 +5492,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPackage_1000ContainedLinks(View view) {
- Package modelElement = (Package) view.getElement();
+ Package modelElement = (Package)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -5704,12 +5512,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_2060ContainedLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5717,12 +5523,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_2061ContainedLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5730,12 +5534,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_2062ContainedLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5743,12 +5545,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_2063ContainedLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5756,12 +5556,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_2064ContainedLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5769,12 +5567,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_2065ContainedLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5782,12 +5578,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_2069ContainedLinks(View view) {
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5795,12 +5589,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_2070ContainedLinks(View view) {
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5808,12 +5600,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_2071ContainedLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5821,12 +5611,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_2072ContainedLinks(View view) {
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5834,12 +5622,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_2073ContainedLinks(View view) {
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5847,12 +5633,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_2075ContainedLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
+ Collaboration modelElement = (Collaboration)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5860,10 +5644,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_2076ContainedLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
+ Interface modelElement = (Interface)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5871,10 +5654,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_2066ContainedLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5882,10 +5664,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_2067ContainedLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5893,10 +5674,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_2068ContainedLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
+ DataType modelElement = (DataType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5904,10 +5684,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_2077ContainedLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
+ Actor modelElement = (Actor)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5915,10 +5694,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_2078ContainedLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5926,10 +5704,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_2079ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
+ Artifact modelElement = (Artifact)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5937,12 +5714,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_2080ContainedLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
+ InformationItem modelElement = (InformationItem)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement));
return result;
}
@@ -5950,10 +5725,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_2081ContainedLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
+ Signal modelElement = (Signal)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -5961,10 +5735,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_2082ContainedLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
+ UseCase modelElement = (UseCase)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6007,10 +5780,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationObservation_2093ContainedLinks(View view) {
- DurationObservation modelElement = (DurationObservation) view.getElement();
+ DurationObservation modelElement = (DurationObservation)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement));
return result;
}
@@ -6018,10 +5790,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeObservation_2094ContainedLinks(View view) {
- TimeObservation modelElement = (TimeObservation) view.getElement();
+ TimeObservation modelElement = (TimeObservation)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement));
return result;
}
@@ -6127,10 +5898,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_2109ContainedLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement));
return result;
}
@@ -6138,10 +5908,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_2110ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6149,10 +5918,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_2111ContainedLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6160,10 +5928,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_2112ContainedLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6171,10 +5938,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_2113ContainedLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6182,10 +5948,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_2114ContainedLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ Constraint modelElement = (Constraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6228,12 +5993,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_3072ContainedLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6241,12 +6004,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_3073ContainedLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6254,12 +6015,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_3074ContainedLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6267,12 +6026,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_3075ContainedLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6280,12 +6037,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_3076ContainedLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6293,12 +6048,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_3077ContainedLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6306,12 +6059,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_3081ContainedLinks(View view) {
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6319,12 +6070,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_3082ContainedLinks(View view) {
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6332,12 +6081,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_3083ContainedLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6345,12 +6092,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_3084ContainedLinks(View view) {
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6358,12 +6103,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_3085ContainedLinks(View view) {
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6371,12 +6114,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_3086ContainedLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
+ Collaboration modelElement = (Collaboration)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Connector_4013
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Connector_4013(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6384,10 +6125,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_3087ContainedLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
+ Interface modelElement = (Interface)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6395,10 +6135,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_3078ContainedLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6406,10 +6145,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_3079ContainedLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6417,10 +6155,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_3080ContainedLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
+ DataType modelElement = (DataType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6428,10 +6165,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_3091ContainedLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
+ Actor modelElement = (Actor)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6439,10 +6175,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_3092ContainedLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6450,10 +6185,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_3093ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
+ Artifact modelElement = (Artifact)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6461,12 +6195,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_3094ContainedLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
+ InformationItem modelElement = (InformationItem)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement));
return result;
}
@@ -6474,10 +6206,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_3095ContainedLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
+ Signal modelElement = (Signal)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6485,10 +6216,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_3096ContainedLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
+ UseCase modelElement = (UseCase)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4015
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4015(modelElement));
return result;
}
@@ -6496,10 +6226,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_3097ContainedLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement));
return result;
}
@@ -6507,10 +6236,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_3116ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6518,10 +6246,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_3117ContainedLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6529,10 +6256,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_3118ContainedLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6540,10 +6266,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_3119ContainedLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6551,10 +6276,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_3120ContainedLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ Constraint modelElement = (Constraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
return result;
}
@@ -6674,43 +6398,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_2060IncomingLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6718,43 +6425,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_2061IncomingLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6762,43 +6452,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_2062IncomingLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6806,43 +6479,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_2063IncomingLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6850,43 +6506,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_2064IncomingLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6894,43 +6533,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_2065IncomingLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6938,43 +6560,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_2069IncomingLinks(View view) {
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -6982,43 +6587,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_2070IncomingLinks(View view) {
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7026,43 +6614,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_2071IncomingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7070,43 +6641,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_2072IncomingLinks(View view) {
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7114,43 +6668,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_2073IncomingLinks(View view) {
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7158,43 +6695,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_2075IncomingLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
+ Collaboration modelElement = (Collaboration)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7202,43 +6722,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_2076IncomingLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
+ Interface modelElement = (Interface)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7246,43 +6749,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_2066IncomingLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7290,43 +6776,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_2067IncomingLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7334,43 +6803,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_2068IncomingLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
+ DataType modelElement = (DataType)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7378,43 +6830,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_2077IncomingLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
+ Actor modelElement = (Actor)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7422,43 +6857,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_2078IncomingLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7466,43 +6884,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_2079IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
+ Artifact modelElement = (Artifact)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7510,43 +6911,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_2080IncomingLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
+ InformationItem modelElement = (InformationItem)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7554,43 +6938,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_2081IncomingLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
+ Signal modelElement = (Signal)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7598,43 +6965,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_2082IncomingLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
+ UseCase modelElement = (UseCase)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7642,39 +6992,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignalEvent_2083IncomingLinks(View view) {
- SignalEvent modelElement = (SignalEvent) view.getElement();
+ SignalEvent modelElement = (SignalEvent)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7682,39 +7017,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCallEvent_2084IncomingLinks(View view) {
- CallEvent modelElement = (CallEvent) view.getElement();
+ CallEvent modelElement = (CallEvent)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7722,39 +7042,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getAnyReceiveEvent_2085IncomingLinks(View view) {
- AnyReceiveEvent modelElement = (AnyReceiveEvent) view.getElement();
+ AnyReceiveEvent modelElement = (AnyReceiveEvent)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7762,39 +7067,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getChangeEvent_2088IncomingLinks(View view) {
- ChangeEvent modelElement = (ChangeEvent) view.getElement();
+ ChangeEvent modelElement = (ChangeEvent)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7802,39 +7092,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeEvent_2089IncomingLinks(View view) {
- TimeEvent modelElement = (TimeEvent) view.getElement();
+ TimeEvent modelElement = (TimeEvent)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7842,39 +7117,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationObservation_2093IncomingLinks(View view) {
- DurationObservation modelElement = (DurationObservation) view.getElement();
+ DurationObservation modelElement = (DurationObservation)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7882,39 +7142,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeObservation_2094IncomingLinks(View view) {
- TimeObservation modelElement = (TimeObservation) view.getElement();
+ TimeObservation modelElement = (TimeObservation)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7922,39 +7167,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralBoolean_2095IncomingLinks(View view) {
- LiteralBoolean modelElement = (LiteralBoolean) view.getElement();
+ LiteralBoolean modelElement = (LiteralBoolean)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -7962,39 +7192,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralInteger_2096IncomingLinks(View view) {
- LiteralInteger modelElement = (LiteralInteger) view.getElement();
+ LiteralInteger modelElement = (LiteralInteger)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8002,39 +7217,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralNull_2097IncomingLinks(View view) {
- LiteralNull modelElement = (LiteralNull) view.getElement();
+ LiteralNull modelElement = (LiteralNull)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8042,39 +7242,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralString_2098IncomingLinks(View view) {
- LiteralString modelElement = (LiteralString) view.getElement();
+ LiteralString modelElement = (LiteralString)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8082,39 +7267,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralUnlimitedNatural_2099IncomingLinks(View view) {
- LiteralUnlimitedNatural modelElement = (LiteralUnlimitedNatural) view.getElement();
+ LiteralUnlimitedNatural modelElement = (LiteralUnlimitedNatural)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8122,39 +7292,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStringExpression_2100IncomingLinks(View view) {
- StringExpression modelElement = (StringExpression) view.getElement();
+ StringExpression modelElement = (StringExpression)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8162,39 +7317,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueExpression_2101IncomingLinks(View view) {
- OpaqueExpression modelElement = (OpaqueExpression) view.getElement();
+ OpaqueExpression modelElement = (OpaqueExpression)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8202,39 +7342,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeExpression_2102IncomingLinks(View view) {
- TimeExpression modelElement = (TimeExpression) view.getElement();
+ TimeExpression modelElement = (TimeExpression)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8242,39 +7367,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExpression_2103IncomingLinks(View view) {
- Expression modelElement = (Expression) view.getElement();
+ Expression modelElement = (Expression)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8282,39 +7392,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDuration_2104IncomingLinks(View view) {
- Duration modelElement = (Duration) view.getElement();
+ Duration modelElement = (Duration)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8322,39 +7417,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeInterval_2105IncomingLinks(View view) {
- TimeInterval modelElement = (TimeInterval) view.getElement();
+ TimeInterval modelElement = (TimeInterval)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8362,39 +7442,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationInterval_2106IncomingLinks(View view) {
- DurationInterval modelElement = (DurationInterval) view.getElement();
+ DurationInterval modelElement = (DurationInterval)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8402,39 +7467,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterval_2107IncomingLinks(View view) {
- Interval modelElement = (Interval) view.getElement();
+ Interval modelElement = (Interval)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8442,39 +7492,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInstanceValue_2108IncomingLinks(View view) {
- InstanceValue modelElement = (InstanceValue) view.getElement();
+ InstanceValue modelElement = (InstanceValue)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8482,13 +7517,11 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_2109IncomingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
return result;
}
@@ -8496,39 +7529,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_2110IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8536,39 +7554,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_2111IncomingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8576,39 +7579,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_2112IncomingLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8616,39 +7604,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_2113IncomingLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8656,39 +7629,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_2114IncomingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ Constraint modelElement = (Constraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8696,39 +7654,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPort_3069IncomingLinks(View view) {
- Port modelElement = (Port) view.getElement();
+ Port modelElement = (Port)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8736,39 +7679,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getParameter_3088IncomingLinks(View view) {
- Parameter modelElement = (Parameter) view.getElement();
+ Parameter modelElement = (Parameter)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8776,39 +7704,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProperty_3070IncomingLinks(View view) {
- Property modelElement = (Property) view.getElement();
+ Property modelElement = (Property)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8816,39 +7729,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConnectableElement_3115IncomingLinks(View view) {
- ConnectableElement modelElement = (ConnectableElement) view.getElement();
+ ConnectableElement modelElement = (ConnectableElement)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8856,39 +7754,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaborationUse_3071IncomingLinks(View view) {
- CollaborationUse modelElement = (CollaborationUse) view.getElement();
+ CollaborationUse modelElement = (CollaborationUse)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8896,43 +7779,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_3072IncomingLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
+ Activity modelElement = (Activity)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8940,43 +7806,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_3073IncomingLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
+ Interaction modelElement = (Interaction)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -8984,43 +7833,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_3074IncomingLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9028,43 +7860,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_3075IncomingLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
+ StateMachine modelElement = (StateMachine)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9072,43 +7887,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_3076IncomingLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9116,43 +7914,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_3077IncomingLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9160,43 +7941,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_3081IncomingLinks(View view) {
- Component modelElement = (Component) view.getElement();
+ Component modelElement = (Component)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9204,43 +7968,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_3082IncomingLinks(View view) {
- Device modelElement = (Device) view.getElement();
+ Device modelElement = (Device)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9248,43 +7995,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_3083IncomingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9292,43 +8022,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_3084IncomingLinks(View view) {
- Node modelElement = (Node) view.getElement();
+ Node modelElement = (Node)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9336,43 +8049,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_3085IncomingLinks(View view) {
- Class modelElement = (Class) view.getElement();
+ Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9380,43 +8076,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_3086IncomingLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
+ Collaboration modelElement = (Collaboration)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9424,43 +8103,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_3087IncomingLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
+ Interface modelElement = (Interface)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9468,43 +8130,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_3078IncomingLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9512,43 +8157,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_3079IncomingLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
+ Enumeration modelElement = (Enumeration)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9556,43 +8184,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_3080IncomingLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
+ DataType modelElement = (DataType)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9600,43 +8211,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_3091IncomingLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
+ Actor modelElement = (Actor)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9644,43 +8238,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_3092IncomingLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9688,43 +8265,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_3093IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
+ Artifact modelElement = (Artifact)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9732,43 +8292,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_3094IncomingLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
+ InformationItem modelElement = (InformationItem)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9776,43 +8319,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_3095IncomingLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
+ Signal modelElement = (Signal)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9820,43 +8346,26 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_3096IncomingLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
+ UseCase modelElement = (UseCase)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4015(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9864,13 +8373,11 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_3097IncomingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
return result;
}
@@ -9878,39 +8385,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_3116IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9918,39 +8410,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_3117IncomingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9958,39 +8435,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_3118IncomingLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -9998,39 +8460,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_3119IncomingLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10038,39 +8485,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_3120IncomingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ Constraint modelElement = (Constraint)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10099,39 +8531,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponentRealization_4004IncomingLinks(View view) {
- ComponentRealization modelElement = (ComponentRealization) view.getElement();
+ ComponentRealization modelElement = (ComponentRealization)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10139,39 +8556,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterfaceRealization_4005IncomingLinks(View view) {
- InterfaceRealization modelElement = (InterfaceRealization) view.getElement();
+ InterfaceRealization modelElement = (InterfaceRealization)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10179,39 +8581,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSubstitution_4011IncomingLinks(View view) {
- Substitution modelElement = (Substitution) view.getElement();
+ Substitution modelElement = (Substitution)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10219,39 +8606,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getRealization_4006IncomingLinks(View view) {
- Realization modelElement = (Realization) view.getElement();
+ Realization modelElement = (Realization)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10259,39 +8631,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getManifestation_4012IncomingLinks(View view) {
- Manifestation modelElement = (Manifestation) view.getElement();
+ Manifestation modelElement = (Manifestation)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10299,39 +8656,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getAbstraction_4007IncomingLinks(View view) {
- Abstraction modelElement = (Abstraction) view.getElement();
+ Abstraction modelElement = (Abstraction)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10339,39 +8681,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUsage_4008IncomingLinks(View view) {
- Usage modelElement = (Usage) view.getElement();
+ Usage modelElement = (Usage)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10379,39 +8706,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeployment_4009IncomingLinks(View view) {
- Deployment modelElement = (Deployment) view.getElement();
+ Deployment modelElement = (Deployment)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10419,39 +8731,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDependency_4017IncomingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
+ Dependency modelElement = (Dependency)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10459,39 +8756,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDependency_4010IncomingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
+ Dependency modelElement = (Dependency)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10499,39 +8781,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConnector_4013IncomingLinks(View view) {
- Connector modelElement = (Connector) view.getElement();
+ Connector modelElement = (Connector)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10539,13 +8806,11 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getGeneralization_4015IncomingLinks(View view) {
- Generalization modelElement = (Generalization) view.getElement();
+ Generalization modelElement = (Generalization)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
return result;
}
@@ -10553,39 +8818,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationFlow_4021IncomingLinks(View view) {
- InformationFlow modelElement = (InformationFlow) view.getElement();
+ InformationFlow modelElement = (InformationFlow)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Realization_4006
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Usage_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ComponentRealization_4004(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_4005(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Substitution_4011(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Realization_4006(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4012(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Abstraction_4007(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4009(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4017(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InformationFlow_4021(modelElement, crossReferencer));
return result;
}
@@ -10593,32 +8843,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_2060OutgoingLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Activity modelElement = (Activity)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10626,32 +8864,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_2061OutgoingLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Interaction modelElement = (Interaction)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10659,32 +8885,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_2062OutgoingLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10692,32 +8906,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_2063OutgoingLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ StateMachine modelElement = (StateMachine)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10725,32 +8927,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_2064OutgoingLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10758,32 +8948,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_2065OutgoingLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10791,32 +8969,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_2069OutgoingLinks(View view) {
- Component modelElement = (Component) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Component modelElement = (Component)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10824,32 +8990,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_2070OutgoingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Device modelElement = (Device)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10857,32 +9011,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_2071OutgoingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10890,32 +9032,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_2072OutgoingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Node modelElement = (Node)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10923,32 +9053,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_2073OutgoingLinks(View view) {
- Class modelElement = (Class) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10956,32 +9074,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_2075OutgoingLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Collaboration modelElement = (Collaboration)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -10989,32 +9095,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_2076OutgoingLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Interface modelElement = (Interface)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11022,32 +9116,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_2066OutgoingLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11055,32 +9137,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_2067OutgoingLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Enumeration modelElement = (Enumeration)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11088,32 +9158,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_2068OutgoingLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DataType modelElement = (DataType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11121,32 +9179,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_2077OutgoingLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Actor modelElement = (Actor)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11154,32 +9200,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_2078OutgoingLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11187,32 +9221,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_2079OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Artifact modelElement = (Artifact)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11220,34 +9242,21 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_2080OutgoingLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ InformationItem modelElement = (InformationItem)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11255,32 +9264,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_2081OutgoingLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Signal modelElement = (Signal)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11288,32 +9285,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_2082OutgoingLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ UseCase modelElement = (UseCase)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11321,30 +9306,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignalEvent_2083OutgoingLinks(View view) {
- SignalEvent modelElement = (SignalEvent) view.getElement();
+ SignalEvent modelElement = (SignalEvent)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11352,30 +9326,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCallEvent_2084OutgoingLinks(View view) {
- CallEvent modelElement = (CallEvent) view.getElement();
+ CallEvent modelElement = (CallEvent)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11383,30 +9346,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getAnyReceiveEvent_2085OutgoingLinks(View view) {
- AnyReceiveEvent modelElement = (AnyReceiveEvent) view.getElement();
+ AnyReceiveEvent modelElement = (AnyReceiveEvent)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11414,30 +9366,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getChangeEvent_2088OutgoingLinks(View view) {
- ChangeEvent modelElement = (ChangeEvent) view.getElement();
+ ChangeEvent modelElement = (ChangeEvent)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11445,30 +9386,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeEvent_2089OutgoingLinks(View view) {
- TimeEvent modelElement = (TimeEvent) view.getElement();
+ TimeEvent modelElement = (TimeEvent)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11476,32 +9406,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationObservation_2093OutgoingLinks(View view) {
- DurationObservation modelElement = (DurationObservation) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_DurationObservation_Event_4019
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DurationObservation modelElement = (DurationObservation)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_DurationObservation_Event_4019(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11509,32 +9427,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeObservation_2094OutgoingLinks(View view) {
- TimeObservation modelElement = (TimeObservation) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_TimeObservation_Event_4018
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ TimeObservation modelElement = (TimeObservation)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_TimeObservation_Event_4018(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11542,30 +9448,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralBoolean_2095OutgoingLinks(View view) {
- LiteralBoolean modelElement = (LiteralBoolean) view.getElement();
+ LiteralBoolean modelElement = (LiteralBoolean)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11573,30 +9468,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralInteger_2096OutgoingLinks(View view) {
- LiteralInteger modelElement = (LiteralInteger) view.getElement();
+ LiteralInteger modelElement = (LiteralInteger)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11604,30 +9488,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralNull_2097OutgoingLinks(View view) {
- LiteralNull modelElement = (LiteralNull) view.getElement();
+ LiteralNull modelElement = (LiteralNull)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11635,30 +9508,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralString_2098OutgoingLinks(View view) {
- LiteralString modelElement = (LiteralString) view.getElement();
+ LiteralString modelElement = (LiteralString)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11666,30 +9528,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getLiteralUnlimitedNatural_2099OutgoingLinks(View view) {
- LiteralUnlimitedNatural modelElement = (LiteralUnlimitedNatural) view.getElement();
+ LiteralUnlimitedNatural modelElement = (LiteralUnlimitedNatural)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11697,30 +9548,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStringExpression_2100OutgoingLinks(View view) {
- StringExpression modelElement = (StringExpression) view.getElement();
+ StringExpression modelElement = (StringExpression)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11728,30 +9568,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueExpression_2101OutgoingLinks(View view) {
- OpaqueExpression modelElement = (OpaqueExpression) view.getElement();
+ OpaqueExpression modelElement = (OpaqueExpression)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11759,30 +9588,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeExpression_2102OutgoingLinks(View view) {
- TimeExpression modelElement = (TimeExpression) view.getElement();
+ TimeExpression modelElement = (TimeExpression)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11790,30 +9608,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExpression_2103OutgoingLinks(View view) {
- Expression modelElement = (Expression) view.getElement();
+ Expression modelElement = (Expression)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11821,30 +9628,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDuration_2104OutgoingLinks(View view) {
- Duration modelElement = (Duration) view.getElement();
+ Duration modelElement = (Duration)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11852,30 +9648,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeInterval_2105OutgoingLinks(View view) {
- TimeInterval modelElement = (TimeInterval) view.getElement();
+ TimeInterval modelElement = (TimeInterval)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11883,30 +9668,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationInterval_2106OutgoingLinks(View view) {
- DurationInterval modelElement = (DurationInterval) view.getElement();
+ DurationInterval modelElement = (DurationInterval)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11914,30 +9688,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterval_2107OutgoingLinks(View view) {
- Interval modelElement = (Interval) view.getElement();
+ Interval modelElement = (Interval)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11945,30 +9708,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInstanceValue_2108OutgoingLinks(View view) {
- InstanceValue modelElement = (InstanceValue) view.getElement();
+ InstanceValue modelElement = (InstanceValue)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -11976,10 +9728,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_2109OutgoingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement));
return result;
}
@@ -11987,32 +9738,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_2110OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12020,32 +9759,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_2111OutgoingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12053,32 +9780,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_2112OutgoingLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12086,32 +9801,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_2113OutgoingLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12119,32 +9822,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_2114OutgoingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Constraint modelElement = (Constraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12152,30 +9843,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPort_3069OutgoingLinks(View view) {
- Port modelElement = (Port) view.getElement();
+ Port modelElement = (Port)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12183,30 +9863,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getParameter_3088OutgoingLinks(View view) {
- Parameter modelElement = (Parameter) view.getElement();
+ Parameter modelElement = (Parameter)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12214,30 +9883,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProperty_3070OutgoingLinks(View view) {
- Property modelElement = (Property) view.getElement();
+ Property modelElement = (Property)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12245,30 +9903,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConnectableElement_3115OutgoingLinks(View view) {
- ConnectableElement modelElement = (ConnectableElement) view.getElement();
+ ConnectableElement modelElement = (ConnectableElement)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12276,30 +9923,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaborationUse_3071OutgoingLinks(View view) {
- CollaborationUse modelElement = (CollaborationUse) view.getElement();
+ CollaborationUse modelElement = (CollaborationUse)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12307,32 +9943,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActivity_3072OutgoingLinks(View view) {
- Activity modelElement = (Activity) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Activity modelElement = (Activity)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12340,32 +9964,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteraction_3073OutgoingLinks(View view) {
- Interaction modelElement = (Interaction) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Interaction modelElement = (Interaction)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12373,32 +9985,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getProtocolStateMachine_3074OutgoingLinks(View view) {
- ProtocolStateMachine modelElement = (ProtocolStateMachine) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ ProtocolStateMachine modelElement = (ProtocolStateMachine)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12406,32 +10006,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getStateMachine_3075OutgoingLinks(View view) {
- StateMachine modelElement = (StateMachine) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ StateMachine modelElement = (StateMachine)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12439,32 +10027,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getFunctionBehavior_3076OutgoingLinks(View view) {
- FunctionBehavior modelElement = (FunctionBehavior) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ FunctionBehavior modelElement = (FunctionBehavior)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12472,32 +10048,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getOpaqueBehavior_3077OutgoingLinks(View view) {
- OpaqueBehavior modelElement = (OpaqueBehavior) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ OpaqueBehavior modelElement = (OpaqueBehavior)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12505,32 +10069,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponent_3081OutgoingLinks(View view) {
- Component modelElement = (Component) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Component modelElement = (Component)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12538,32 +10090,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDevice_3082OutgoingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Device modelElement = (Device)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12571,32 +10111,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getExecutionEnvironment_3083OutgoingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ ExecutionEnvironment modelElement = (ExecutionEnvironment)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12604,32 +10132,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getNode_3084OutgoingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Node modelElement = (Node)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12637,32 +10153,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getClass_3085OutgoingLinks(View view) {
- Class modelElement = (Class) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12670,32 +10174,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getCollaboration_3086OutgoingLinks(View view) {
- Collaboration modelElement = (Collaboration) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Collaboration modelElement = (Collaboration)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12703,32 +10195,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterface_3087OutgoingLinks(View view) {
- Interface modelElement = (Interface) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Interface modelElement = (Interface)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12736,32 +10216,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPrimitiveType_3078OutgoingLinks(View view) {
- PrimitiveType modelElement = (PrimitiveType) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12769,32 +10237,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getEnumeration_3079OutgoingLinks(View view) {
- Enumeration modelElement = (Enumeration) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Enumeration modelElement = (Enumeration)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12802,32 +10258,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDataType_3080OutgoingLinks(View view) {
- DataType modelElement = (DataType) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DataType modelElement = (DataType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12835,32 +10279,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getActor_3091OutgoingLinks(View view) {
- Actor modelElement = (Actor) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Actor modelElement = (Actor)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12868,32 +10300,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeploymentSpecification_3092OutgoingLinks(View view) {
- DeploymentSpecification modelElement = (DeploymentSpecification) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DeploymentSpecification modelElement = (DeploymentSpecification)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12901,32 +10321,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getArtifact_3093OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Artifact modelElement = (Artifact)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12934,34 +10342,21 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationItem_3094OutgoingLinks(View view) {
- InformationItem modelElement = (InformationItem) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ InformationItem modelElement = (InformationItem)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -12969,32 +10364,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSignal_3095OutgoingLinks(View view) {
- Signal modelElement = (Signal) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Signal modelElement = (Signal)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13002,32 +10385,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUseCase_3096OutgoingLinks(View view) {
- UseCase modelElement = (UseCase) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ UseCase modelElement = (UseCase)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4015(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13035,10 +10406,9 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComment_3097OutgoingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ Comment modelElement = (Comment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(modelElement));
return result;
}
@@ -13046,32 +10416,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDurationConstraint_3116OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ DurationConstraint modelElement = (DurationConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13079,32 +10437,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getTimeConstraint_3117OutgoingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ TimeConstraint modelElement = (TimeConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13112,32 +10458,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getIntervalConstraint_3118OutgoingLinks(View view) {
- IntervalConstraint modelElement = (IntervalConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ IntervalConstraint modelElement = (IntervalConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13145,32 +10479,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInteractionConstraint_3119OutgoingLinks(View view) {
- InteractionConstraint modelElement = (InteractionConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ InteractionConstraint modelElement = (InteractionConstraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13178,32 +10500,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConstraint_3120OutgoingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ Constraint modelElement = (Constraint)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13232,30 +10542,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getComponentRealization_4004OutgoingLinks(View view) {
- ComponentRealization modelElement = (ComponentRealization) view.getElement();
+ ComponentRealization modelElement = (ComponentRealization)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13263,30 +10562,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInterfaceRealization_4005OutgoingLinks(View view) {
- InterfaceRealization modelElement = (InterfaceRealization) view.getElement();
+ InterfaceRealization modelElement = (InterfaceRealization)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13294,30 +10582,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getSubstitution_4011OutgoingLinks(View view) {
- Substitution modelElement = (Substitution) view.getElement();
+ Substitution modelElement = (Substitution)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13325,30 +10602,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getRealization_4006OutgoingLinks(View view) {
- Realization modelElement = (Realization) view.getElement();
+ Realization modelElement = (Realization)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13356,30 +10622,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getManifestation_4012OutgoingLinks(View view) {
- Manifestation modelElement = (Manifestation) view.getElement();
+ Manifestation modelElement = (Manifestation)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13387,30 +10642,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getAbstraction_4007OutgoingLinks(View view) {
- Abstraction modelElement = (Abstraction) view.getElement();
+ Abstraction modelElement = (Abstraction)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13418,30 +10662,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getUsage_4008OutgoingLinks(View view) {
- Usage modelElement = (Usage) view.getElement();
+ Usage modelElement = (Usage)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13449,30 +10682,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDeployment_4009OutgoingLinks(View view) {
- Deployment modelElement = (Deployment) view.getElement();
+ Deployment modelElement = (Deployment)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13480,30 +10702,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDependency_4017OutgoingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
+ Dependency modelElement = (Dependency)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13511,30 +10722,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getDependency_4010OutgoingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
+ Dependency modelElement = (Dependency)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13542,30 +10742,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getConnector_4013OutgoingLinks(View view) {
- Connector modelElement = (Connector) view.getElement();
+ Connector modelElement = (Connector)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13580,30 +10769,19 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getInformationFlow_4021OutgoingLinks(View view) {
- InformationFlow modelElement = (InformationFlow) view.getElement();
+ InformationFlow modelElement = (InformationFlow)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ComponentRealization_4004(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InterfaceRealization_4005(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Substitution_4011(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Realization_4006(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4012(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Abstraction_4007(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4009(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4017(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_InformationFlow_4021(modelElement));
return result;
}
@@ -13612,28 +10790,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_ComponentRealization_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 ComponentRealization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof ComponentRealization) {
continue;
}
- ComponentRealization link = (ComponentRealization) linkObject;
- if (ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ ComponentRealization link = (ComponentRealization)linkObject;
+ if(ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.ComponentRealization_4004, ComponentRealizationEditPart.VISUAL_ID));
}
return result;
@@ -13644,28 +10821,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_InterfaceRealization_4005(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 InterfaceRealization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof InterfaceRealization) {
continue;
}
- InterfaceRealization link = (InterfaceRealization) linkObject;
- if (InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InterfaceRealization link = (InterfaceRealization)linkObject;
+ if(InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.InterfaceRealization_4005, InterfaceRealizationEditPart.VISUAL_ID));
}
return result;
@@ -13676,28 +10852,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Substitution_4011(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 Substitution) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Substitution) {
continue;
}
- Substitution link = (Substitution) linkObject;
- if (SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Substitution link = (Substitution)linkObject;
+ if(SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Substitution_4011, SubstitutionEditPart.VISUAL_ID));
}
return result;
@@ -13708,28 +10883,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Realization_4006(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 Realization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Realization) {
continue;
}
- Realization link = (Realization) linkObject;
- if (RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Realization link = (Realization)linkObject;
+ if(RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Realization_4006, RealizationEditPart.VISUAL_ID));
}
return result;
@@ -13740,28 +10914,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Manifestation_4012(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 Manifestation) {
+ for(Iterator<?> links = container.getPackagedElements().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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4012, ManifestationEditPart.VISUAL_ID));
}
return result;
@@ -13772,28 +10945,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Abstraction_4007(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 Abstraction) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Abstraction) {
continue;
}
- Abstraction link = (Abstraction) linkObject;
- if (AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Abstraction link = (Abstraction)linkObject;
+ if(AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Abstraction_4007, AbstractionEditPart.VISUAL_ID));
}
return result;
@@ -13804,28 +10976,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Usage_4008(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 Usage) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Usage) {
continue;
}
- Usage link = (Usage) linkObject;
- if (UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Usage link = (Usage)linkObject;
+ if(UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Usage_4008, UsageEditPart.VISUAL_ID));
}
return result;
@@ -13836,28 +11007,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Deployment_4009(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 Deployment) {
+ for(Iterator<?> links = container.getPackagedElements().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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4009, DeploymentEditPart.VISUAL_ID));
}
return result;
@@ -13868,28 +11038,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Dependency_4017(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) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Dependency) {
continue;
}
- Dependency link = (Dependency) linkObject;
- if (RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Dependency link = (Dependency)linkObject;
+ if(RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4017, RoleBindingEditPart.VISUAL_ID));
}
return result;
@@ -13900,28 +11069,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
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) {
+ 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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyEditPart.VISUAL_ID));
}
return result;
@@ -13932,28 +11100,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Connector_4013(StructuredClassifier container) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getOwnedConnectors()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Connector) {
+ for(Iterator<?> links = container.getOwnedConnectors().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Connector) {
continue;
}
- Connector link = (Connector) linkObject;
- if (ConnectorEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Connector link = (Connector)linkObject;
+ if(ConnectorEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getEnds();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof ConnectorEnd) {
+ if(false == theTarget instanceof ConnectorEnd) {
continue;
}
- ConnectorEnd dst = (ConnectorEnd) theTarget;
+ ConnectorEnd dst = (ConnectorEnd)theTarget;
List<?> sources = link.getEnds();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof ConnectorEnd) {
+ if(false == theSource instanceof ConnectorEnd) {
continue;
}
- ConnectorEnd src = (ConnectorEnd) theSource;
+ ConnectorEnd src = (ConnectorEnd)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Connector_4013, ConnectorEditPart.VISUAL_ID));
}
return result;
@@ -13964,14 +11131,13 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Generalization_4015(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) {
+ 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)) {
+ Generalization link = (Generalization)linkObject;
+ if(GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
Classifier dst = link.getGeneral();
@@ -13986,28 +11152,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_InformationFlow_4021(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 InformationFlow) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof InformationFlow) {
continue;
}
- InformationFlow link = (InformationFlow) linkObject;
- if (InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InformationFlow link = (InformationFlow)linkObject;
+ if(InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getInformationTargets();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getInformationSources();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.InformationFlow_4021, InformationFlowEditPart.VISUAL_ID));
}
return result;
@@ -14019,8 +11184,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(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()) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.CommentAnnotatedElement_4002, CommentAnnotatedElementEditPart.VISUAL_ID));
}
}
@@ -14033,8 +11198,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(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()) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.ConstraintConstrainedElement_4003, ConstraintConstrainedElementEditPart.VISUAL_ID));
}
}
@@ -14047,20 +11212,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_ComponentRealization_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 ComponentRealization) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof ComponentRealization) {
continue;
}
- ComponentRealization link = (ComponentRealization) setting.getEObject();
- if (ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ ComponentRealization link = (ComponentRealization)setting.getEObject();
+ if(ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.ComponentRealization_4004, ComponentRealizationEditPart.VISUAL_ID));
}
return result;
@@ -14072,20 +11237,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_InterfaceRealization_4005(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 InterfaceRealization) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof InterfaceRealization) {
continue;
}
- InterfaceRealization link = (InterfaceRealization) setting.getEObject();
- if (InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InterfaceRealization link = (InterfaceRealization)setting.getEObject();
+ if(InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.InterfaceRealization_4005, InterfaceRealizationEditPart.VISUAL_ID));
}
return result;
@@ -14097,20 +11262,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Substitution_4011(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 Substitution) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Substitution) {
continue;
}
- Substitution link = (Substitution) setting.getEObject();
- if (SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Substitution link = (Substitution)setting.getEObject();
+ if(SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Substitution_4011, SubstitutionEditPart.VISUAL_ID));
}
return result;
@@ -14122,20 +11287,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Realization_4006(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 Realization) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Realization) {
continue;
}
- Realization link = (Realization) setting.getEObject();
- if (RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Realization link = (Realization)setting.getEObject();
+ if(RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Realization_4006, RealizationEditPart.VISUAL_ID));
}
return result;
@@ -14147,20 +11312,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Manifestation_4012(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) {
+ 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)) {
+ 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) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Manifestation_4012, ManifestationEditPart.VISUAL_ID));
}
return result;
@@ -14172,20 +11337,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Abstraction_4007(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 Abstraction) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Abstraction) {
continue;
}
- Abstraction link = (Abstraction) setting.getEObject();
- if (AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Abstraction link = (Abstraction)setting.getEObject();
+ if(AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Abstraction_4007, AbstractionEditPart.VISUAL_ID));
}
return result;
@@ -14197,20 +11362,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Usage_4008(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 Usage) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Usage) {
continue;
}
- Usage link = (Usage) setting.getEObject();
- if (UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Usage link = (Usage)setting.getEObject();
+ if(UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Usage_4008, UsageEditPart.VISUAL_ID));
}
return result;
@@ -14222,20 +11387,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Deployment_4009(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) {
+ 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)) {
+ 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) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Deployment_4009, DeploymentEditPart.VISUAL_ID));
}
return result;
@@ -14247,20 +11412,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
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) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
continue;
}
- Dependency link = (Dependency) setting.getEObject();
- if (RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Dependency link = (Dependency)setting.getEObject();
+ if(RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4017, RoleBindingEditPart.VISUAL_ID));
}
return result;
@@ -14272,20 +11437,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
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) {
+ 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)) {
+ 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) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4010, DependencyEditPart.VISUAL_ID));
}
return result;
@@ -14297,12 +11462,12 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_4015(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) {
+ 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)) {
+ Generalization link = (Generalization)setting.getEObject();
+ if(GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
Classifier src = link.getSpecific();
@@ -14317,8 +11482,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_TimeObservation_Event_4018(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.getTimeObservation_Event()) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getTimeObservation_Event()) {
result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.TimeObservationEvent_4018, TimeObservationEventEditPart.VISUAL_ID));
}
}
@@ -14331,8 +11496,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_DurationObservation_Event_4019(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.getDurationObservation_Event()) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getDurationObservation_Event()) {
result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.DurationObservationEvent_4019, DurationObservationEventEditPart.VISUAL_ID));
}
}
@@ -14345,8 +11510,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_InformationItem_Represented_4020(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.getInformationItem_Represented()) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getInformationItem_Represented()) {
result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.InformationItemRepresented_4020, RepresentationEditPart.VISUAL_ID));
}
}
@@ -14359,20 +11524,20 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_InformationFlow_4021(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.getInformationFlow_InformationTarget() || false == setting.getEObject() instanceof InformationFlow) {
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getInformationFlow_InformationTarget() || false == setting.getEObject() instanceof InformationFlow) {
continue;
}
- InformationFlow link = (InformationFlow) setting.getEObject();
- if (InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InformationFlow link = (InformationFlow)setting.getEObject();
+ if(InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> sources = link.getInformationSources();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
+ NamedElement src = (NamedElement)theSource;
result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.InformationFlow_4021, InformationFlowEditPart.VISUAL_ID));
}
return result;
@@ -14383,9 +11548,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4002(Comment source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getAnnotatedElements()
- .iterator(); destinations.hasNext();) {
- Element destination = (Element) destinations.next();
+ for(Iterator<?> destinations = source.getAnnotatedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element)destinations.next();
result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.CommentAnnotatedElement_4002, CommentAnnotatedElementEditPart.VISUAL_ID));
}
return result;
@@ -14396,9 +11560,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4003(Constraint source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getConstrainedElements()
- .iterator(); destinations.hasNext();) {
- Element destination = (Element) destinations.next();
+ for(Iterator<?> destinations = source.getConstrainedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element)destinations.next();
result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.ConstraintConstrainedElement_4003, ConstraintConstrainedElementEditPart.VISUAL_ID));
}
return result;
@@ -14412,38 +11575,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 ComponentRealization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof ComponentRealization) {
continue;
}
- ComponentRealization link = (ComponentRealization) linkObject;
- if (ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ ComponentRealization link = (ComponentRealization)linkObject;
+ if(ComponentRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.ComponentRealization_4004, ComponentRealizationEditPart.VISUAL_ID));
@@ -14459,38 +11621,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 InterfaceRealization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof InterfaceRealization) {
continue;
}
- InterfaceRealization link = (InterfaceRealization) linkObject;
- if (InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InterfaceRealization link = (InterfaceRealization)linkObject;
+ if(InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.InterfaceRealization_4005, InterfaceRealizationEditPart.VISUAL_ID));
@@ -14506,38 +11667,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Substitution) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Substitution) {
continue;
}
- Substitution link = (Substitution) linkObject;
- if (SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Substitution link = (Substitution)linkObject;
+ if(SubstitutionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Substitution_4011, SubstitutionEditPart.VISUAL_ID));
@@ -14553,38 +11713,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Realization) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Realization) {
continue;
}
- Realization link = (Realization) linkObject;
- if (RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Realization link = (Realization)linkObject;
+ if(RealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Realization_4006, RealizationEditPart.VISUAL_ID));
@@ -14600,38 +11759,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Manifestation) {
+ for(Iterator<?> links = container.getPackagedElements().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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4012, ManifestationEditPart.VISUAL_ID));
@@ -14647,38 +11805,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Abstraction) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Abstraction) {
continue;
}
- Abstraction link = (Abstraction) linkObject;
- if (AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Abstraction link = (Abstraction)linkObject;
+ if(AbstractionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Abstraction_4007, AbstractionEditPart.VISUAL_ID));
@@ -14694,38 +11851,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Usage) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Usage) {
continue;
}
- Usage link = (Usage) linkObject;
- if (UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Usage link = (Usage)linkObject;
+ if(UsageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Usage_4008, UsageEditPart.VISUAL_ID));
@@ -14741,38 +11897,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 Deployment) {
+ for(Iterator<?> links = container.getPackagedElements().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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4009, DeploymentEditPart.VISUAL_ID));
@@ -14788,38 +11943,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof Dependency) {
continue;
}
- Dependency link = (Dependency) linkObject;
- if (RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ Dependency link = (Dependency)linkObject;
+ if(RoleBindingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4017, RoleBindingEditPart.VISUAL_ID));
@@ -14835,38 +11989,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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) {
+ 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)) {
+ 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) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyEditPart.VISUAL_ID));
@@ -14882,28 +12035,27 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Classifier) {
+ container = (Classifier)element;
}
}
- if (container == null) {
+ 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) {
+ 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)) {
+ Generalization link = (Generalization)linkObject;
+ if(GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
Classifier dst = link.getGeneral();
Classifier src = link.getSpecific();
- if (src != source) {
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Generalization_4015, GeneralizationEditPart.VISUAL_ID));
@@ -14917,7 +12069,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_TimeObservation_Event_4018(TimeObservation source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
NamedElement destination = source.getEvent();
- if (destination == null) {
+ if(destination == null) {
return result;
}
result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.TimeObservationEvent_4018, TimeObservationEventEditPart.VISUAL_ID));
@@ -14929,9 +12081,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_DurationObservation_Event_4019(DurationObservation source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getEvents()
- .iterator(); destinations.hasNext();) {
- NamedElement destination = (NamedElement) destinations.next();
+ for(Iterator<?> destinations = source.getEvents().iterator(); destinations.hasNext();) {
+ NamedElement destination = (NamedElement)destinations.next();
result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.DurationObservationEvent_4019, DurationObservationEventEditPart.VISUAL_ID));
}
return result;
@@ -14942,9 +12093,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_InformationItem_Represented_4020(InformationItem source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getRepresenteds()
- .iterator(); destinations.hasNext();) {
- Classifier destination = (Classifier) destinations.next();
+ for(Iterator<?> destinations = source.getRepresenteds().iterator(); destinations.hasNext();) {
+ Classifier destination = (Classifier)destinations.next();
result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.InformationItemRepresented_4020, RepresentationEditPart.VISUAL_ID));
}
return result;
@@ -14958,38 +12108,37 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// 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;
+ for(EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if(element instanceof Package) {
+ container = (Package)element;
}
}
- if (container == null) {
+ 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 InformationFlow) {
+ for(Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject)links.next();
+ if(false == linkObject instanceof InformationFlow) {
continue;
}
- InformationFlow link = (InformationFlow) linkObject;
- if (InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ InformationFlow link = (InformationFlow)linkObject;
+ if(InformationFlowEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
List<?> targets = link.getInformationTargets();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if (false == theTarget instanceof NamedElement) {
+ if(false == theTarget instanceof NamedElement) {
continue;
}
- NamedElement dst = (NamedElement) theTarget;
+ NamedElement dst = (NamedElement)theTarget;
List<?> sources = link.getInformationSources();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
+ if(false == theSource instanceof NamedElement) {
continue;
}
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
+ NamedElement src = (NamedElement)theSource;
+ if(src != source) {
continue;
}
result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.InformationFlow_4021, InformationFlowEditPart.VISUAL_ID));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java
index 1039b1e7238..cd62145d240 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -73,18 +73,13 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @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));
+ 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);
-
+ IEditorInput editorInput = (IEditorInput)element;
+ IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
@@ -94,17 +89,13 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @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));
+ 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);
+ setDocumentContent(document, (IEditorInput)element);
setupDocument(element, document);
return document;
}
@@ -113,11 +104,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* 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
+ *
+ * @param element the blue-print element
+ * @param document the document to set up
* @generated
*/
protected void setupDocument(Object element, IDocument document) {
@@ -129,11 +118,11 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
*/
private long computeModificationStamp(ResourceSetInfo info) {
int result = 0;
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- if (file.getLocation() != null) {
+ if(file != null) {
+ if(file.getLocation() != null) {
result += file.getLocation().toFile().lastModified();
} else {
result += file.getModificationStamp();
@@ -146,7 +135,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected IDocument createEmptyDocument() {
DiagramDocument document = new DiagramDocument();
document.setEditingDomain(createEditingDomain());
@@ -159,8 +147,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
private TransactionalEditingDomain createEditingDomain() {
TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory.getInstance().createEditingDomain();
editingDomain.setID("org.eclipse.papyrus.uml.diagram.composite.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));
+ 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;
@@ -177,10 +164,10 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
@Override
public void notifyChanged(Notification notification) {
- if (diagramResourceModifiedFilter.matches(notification)) {
+ if(diagramResourceModifiedFilter.matches(notification)) {
Object value = notification.getNewValue();
- if (value instanceof Resource) {
- ((Resource) value).setTrackingModification(true);
+ if(value instanceof Resource) {
+ ((Resource)value).setTrackingModification(true);
}
}
}
@@ -189,9 +176,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
public void setTarget(Notifier newTarget) {
myTarger = newTarget;
}
-
});
-
return editingDomain;
}
@@ -199,25 +184,25 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* @generated
*/
protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException {
- IDiagramDocument diagramDocument = (IDiagramDocument) document;
+ IDiagramDocument diagramDocument = (IDiagramDocument)document;
TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if (element instanceof FileEditorInput) {
- IStorage storage = ((FileEditorInput) element).getStorage();
+ 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();
+ } else if(element instanceof URIEditorInput) {
+ URI uri = ((URIEditorInput)element).getURI();
Resource resource = null;
try {
resource = domain.getResourceSet().getResource(uri.trimFragment(), false);
- if (resource == null) {
+ if(resource == null) {
resource = domain.getResourceSet().createResource(uri.trimFragment());
}
- if (!resource.isLoaded()) {
+ if(!resource.isLoaded()) {
try {
@SuppressWarnings({ "rawtypes", "unchecked" })
Map<?, ?> options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
- // @see 171060
+ // @see 171060
// options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
resource.load(options);
} catch (IOException e) {
@@ -225,16 +210,16 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
throw e;
}
}
- if (uri.fragment() != null) {
+ if(uri.fragment() != null) {
EObject rootElement = resource.getEObject(uri.fragment());
- if (rootElement instanceof Diagram) {
+ if(rootElement instanceof Diagram) {
document.setContent(rootElement);
return;
}
} else {
- for (Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
+ for(Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
Object rootElement = it.next();
- if (rootElement instanceof Diagram) {
+ if(rootElement instanceof Diagram) {
document.setContent(rootElement);
return;
}
@@ -243,31 +228,26 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
throw new RuntimeException(Messages.UMLDocumentProvider_NoDiagramInResourceError);
} catch (Exception e) {
CoreException thrownExcp = null;
- if (e instanceof CoreException) {
- thrownExcp = (CoreException) e;
+ 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));
+ 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));
+ 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) {
+ if(info != null) {
return computeModificationStamp(info);
}
return super.getModificationStamp(element);
@@ -276,12 +256,11 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isDeleted(Object element) {
IDiagramDocument document = getDiagramDocument(element);
- if (document != null) {
+ if(document != null) {
Resource diagramResource = document.getDiagram().eResource();
- if (diagramResource != null) {
+ if(diagramResource != null) {
IFile file = WorkspaceSynchronizer.getFile(diagramResource);
return file == null || file.getLocation() == null || !file.getLocation().toFile().exists();
}
@@ -293,16 +272,15 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* @generated
*/
public ResourceSetInfo getResourceSetInfo(Object editorInput) {
- return (ResourceSetInfo) super.getElementInfo(editorInput);
+ return (ResourceSetInfo)super.getElementInfo(editorInput);
}
/**
* @generated
*/
- @Override
protected void disposeElementInfo(Object element, ElementInfo info) {
- if (info instanceof ResourceSetInfo) {
- ResourceSetInfo resourceSetInfo = (ResourceSetInfo) info;
+ if(info instanceof ResourceSetInfo) {
+ ResourceSetInfo resourceSetInfo = (ResourceSetInfo)info;
resourceSetInfo.dispose();
}
super.disposeElementInfo(element, info);
@@ -311,32 +289,29 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected void doValidateState(Object element, Object computationContext) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
LinkedList<IFile> files2Validate = new LinkedList<IFile>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null && file.isReadOnly()) {
+ 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()) {
+ if(info != null) {
+ if(info.isUpdateCache()) {
try {
updateCache(element);
} catch (CoreException ex) {
@@ -352,16 +327,15 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isModifiable(Object element) {
- if (!isStateValidated(element)) {
- if (element instanceof FileEditorInput || element instanceof URIEditorInput) {
+ if(!isStateValidated(element)) {
+ if(element instanceof FileEditorInput || element instanceof URIEditorInput) {
return true;
}
}
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (info.isUpdateCache()) {
+ if(info != null) {
+ if(info.isUpdateCache()) {
try {
updateCache(element);
} catch (CoreException ex) {
@@ -379,11 +353,11 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
*/
protected void updateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ 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()) {
+ if(file != null && file.isReadOnly()) {
info.setReadOnly(true);
info.setModifiable(false);
return;
@@ -398,10 +372,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected void doUpdateStateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
info.setUpdateCache(true);
}
super.doUpdateStateCache(element);
@@ -410,10 +383,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isSynchronized(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
return info.isSynchronized();
}
return super.isSynchronized(element);
@@ -422,15 +394,14 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getResetRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
+ if(file != null) {
rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
}
}
@@ -442,15 +413,14 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getSaveRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
+ if(file != null) {
rules.add(computeSchedulingRule(file));
}
}
@@ -462,15 +432,14 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getSynchronizeRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
+ if(file != null) {
rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
}
}
@@ -482,15 +451,14 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getValidateStateRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
+ if(info != null) {
LinkedList<ISchedulingRule> files = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
+ if(file != null) {
files.add(file);
}
}
@@ -503,7 +471,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* @generated
*/
private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
- if (toCreateOrModify.exists()) {
+ if(toCreateOrModify.exists()) {
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
}
IResource parent = toCreateOrModify;
@@ -516,19 +484,17 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
*/
toCreateOrModify = parent;
parent = toCreateOrModify.getParent();
- } while (parent != null && !parent.exists());
-
+ } 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();) {
+ if(info != null) {
+ for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
handleElementChanged(info, nextResource, monitor);
}
@@ -540,26 +506,20 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @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));
+ 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();) {
+ 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)) {
+ monitor.setTaskName(NLS.bind(Messages.UMLDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
+ if(nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
try {
nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
@@ -580,30 +540,27 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
} else {
URI newResoruceURI;
List<IFile> affectedFiles = null;
- if (element instanceof FileEditorInput) {
- IFile newFile = ((FileEditorInput) element).getFile();
+ 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 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));
+ 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) {
+ 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$
+ 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;
+ 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);
@@ -627,7 +584,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
*/
protected void handleElementChanged(ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) {
IFile file = WorkspaceSynchronizer.getFile(changedResource);
- if (file != null) {
+ if(file != null) {
try {
file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
} catch (CoreException ex) {
@@ -636,7 +593,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
}
changedResource.unload();
-
fireElementContentAboutToBeReplaced(info.getEditorInput());
removeUnchangedElementListeners(info.getEditorInput(), info);
info.fStatus = null;
@@ -645,7 +601,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
} catch (CoreException e) {
info.fStatus = e.getStatus();
}
- if (!info.fCanBeSaved) {
+ if(!info.fCanBeSaved) {
info.setModificationStamp(computeModificationStamp(info));
}
addUnchangedElementListeners(info.getEditorInput(), info);
@@ -656,7 +612,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* @generated
*/
protected void handleElementMoved(IEditorInput input, URI uri) {
- if (input instanceof FileEditorInput) {
+ 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;
@@ -668,7 +624,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
return editorInput;
}
@@ -676,11 +631,10 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public IDiagramDocument getDiagramDocument(Object element) {
IDocument doc = getDocument(element);
- if (doc instanceof IDiagramDocument) {
- return (IDiagramDocument) doc;
+ if(doc instanceof IDiagramDocument) {
+ return (IDiagramDocument)doc;
}
return null;
}
@@ -688,7 +642,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
return null;
}
@@ -803,7 +756,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
public void dispose() {
stopResourceListening();
getResourceSet().eAdapters().remove(myResourceSetListener);
- for (Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();) {
+ for(Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();) {
Resource resource = it.next();
resource.unload();
}
@@ -896,22 +849,21 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public void dispose() {
}
/**
* @generated
*/
- @Override
public boolean handleResourceChanged(final Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
+ 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);
@@ -923,15 +875,15 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean handleResourceDeleted(Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
+ 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());
@@ -943,16 +895,16 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean handleResourceMoved(Resource resource, final URI newURI) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
+ synchronized(ResourceSetInfo.this) {
+ if(ResourceSetInfo.this.fCanBeSaved) {
ResourceSetInfo.this.setUnSynchronized(resource);
return true;
}
}
- if (myDocument.getDiagram().eResource() == resource) {
+ if(myDocument.getDiagram().eResource() == resource) {
Display.getDefault().asyncExec(new Runnable() {
+
@Override
public void run() {
handleElementMoved(ResourceSetInfo.this.getEditorInput(), newURI);
@@ -992,36 +944,34 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public void notifyChanged(Notification notification) {
- if (notification.getNotifier() instanceof ResourceSet) {
+ 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()) {
+ 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;) {
+ for(Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
Resource nextResource = it.next();
- if (nextResource.isLoaded()) {
+ if(nextResource.isLoaded()) {
modified = nextResource.isModified();
}
}
boolean dirtyStateChanged = false;
- synchronized (myInfo) {
- if (modified != myInfo.fCanBeSaved) {
+ synchronized(myInfo) {
+ if(modified != myInfo.fCanBeSaved) {
myInfo.fCanBeSaved = modified;
dirtyStateChanged = true;
}
- if (!resource.isModified()) {
+ if(!resource.isModified()) {
myInfo.setSynchronized(resource);
}
}
- if (dirtyStateChanged) {
+ if(dirtyStateChanged) {
fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
- if (!modified) {
+ if(!modified) {
myInfo.setModificationStamp(computeModificationStamp(myInfo));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLInitDiagramFileAction.java
index fad6de275bd..ed2fe467312 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLInitDiagramFileAction.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -48,7 +48,6 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
this.targetPart = targetPart;
}
@@ -56,15 +55,13 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void selectionChanged(IAction action, ISelection selection) {
domainModelURI = null;
action.setEnabled(false);
- if (selection instanceof IStructuredSelection == false || selection.isEmpty()) {
+ if(selection instanceof IStructuredSelection == false || selection.isEmpty()) {
return;
}
- IFile file =
- (IFile) ((IStructuredSelection) selection).getFirstElement();
+ IFile file = (IFile)((IStructuredSelection)selection).getFirstElement();
domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
action.setEnabled(true);
}
@@ -79,29 +76,22 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void run(IAction action) {
- TransactionalEditingDomain editingDomain =
- WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
+ 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$
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
}
- if (diagramRoot == null) {
- MessageDialog.openError(getShell(),
- Messages.InitDiagramFile_ResourceErrorDialogTitle,
- Messages.InitDiagramFile_ResourceErrorDialogMessage);
+ 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,
- CompositeStructureDiagramEditPart.MODEL_ID));
+ wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, CompositeStructureDiagramEditPart.MODEL_ID));
UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLLinkDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLLinkDescriptor.java
index be96de79414..42e20a57795 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLLinkDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLLinkDescriptor.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java
index 0b16a5d79e0..ce6a3fc41fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,7 +25,6 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy {
/**
* @generated
*/
- @Override
public boolean matches(IEditorReference editorRef, IEditorInput input) {
IEditorInput editorInput;
try {
@@ -33,12 +32,11 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy {
} catch (PartInitException e) {
return false;
}
-
- if (editorInput.equals(input)) {
+ if(editorInput.equals(input)) {
return true;
}
- if (editorInput instanceof URIEditorInput && input instanceof URIEditorInput) {
- return ((URIEditorInput) editorInput).getURI().equals(((URIEditorInput) input).getURI());
+ if(editorInput instanceof URIEditorInput && input instanceof URIEditorInput) {
+ return ((URIEditorInput)editorInput).getURI().equals(((URIEditorInput)input).getURI());
}
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java
index 365fa05c8e2..28209d52587 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -67,39 +67,31 @@ public class UMLNewDiagramFileWizard extends Wizard {
assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
- myFileCreationPage = new WizardNewFileCreationPage
- (Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
+ myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
- myFileCreationPage.setDescription(NLS.bind(
- Messages.UMLNewDiagramFileWizard_CreationPageDescription,
- CompositeStructureDiagramEditPart.MODEL_ID));
+ myFileCreationPage.setDescription(NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, CompositeStructureDiagramEditPart.MODEL_ID));
IPath filePath;
String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
- if (domainModelURI.isPlatformResource()) {
+ if(domainModelURI.isPlatformResource()) {
filePath = new Path(domainModelURI.trimSegments(1).toPlatformString(true));
- } else if (domainModelURI.isFile()) {
+ } 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, "uml_csd")); //$NON-NLS-1$
-
+ myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "uml_csd")); //$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);
@@ -108,7 +100,6 @@ public class UMLNewDiagramFileWizard extends Wizard {
/**
* @generated
*/
- @Override
public boolean performFinish() {
LinkedList<IFile> affectedFiles = new LinkedList<IFile>();
IFile diagramFile = myFileCreationPage.createNewFile();
@@ -117,38 +108,28 @@ public class UMLNewDiagramFileWizard extends Wizard {
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 != CompositeStructureDiagramEditPart.VISUAL_ID) {
- return CommandResult.newErrorCommandResult(
- Messages.UMLNewDiagramFileWizard_IncorrectRootError);
- }
- Diagram diagram =
- ViewService.createDiagram(
- diagramRootElementSelectionPage.getModelElement(), CompositeStructureDiagramEditPart.MODEL_ID,
- UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- diagramResource.getContents().add(diagram);
- new UMLDiagramContentInitializer().initDiagramContent(diagram);
- return CommandResult.newOKCommandResult();
- }
- };
+ 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 != CompositeStructureDiagramEditPart.VISUAL_ID) {
+ return CommandResult.newErrorCommandResult(Messages.UMLNewDiagramFileWizard_IncorrectRootError);
+ }
+ Diagram diagram = ViewService.createDiagram(diagramRootElementSelectionPage.getModelElement(), CompositeStructureDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ diagramResource.getContents().add(diagram);
+ new UMLDiagramContentInitializer().initDiagramContent(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+ };
try {
- OperationHistoryFactory.getOperationHistory().execute(
- command, new NullProgressMonitor(), null);
+ 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$
+ 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$
}
@@ -170,7 +151,6 @@ public class UMLNewDiagramFileWizard extends Wizard {
/**
* @generated
*/
- @Override
protected String getSelectionTitle() {
return Messages.UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle;
}
@@ -178,16 +158,12 @@ public class UMLNewDiagramFileWizard extends Wizard {
/**
* @generated
*/
- @Override
protected boolean validatePage() {
- if (getModelElement() == null) {
+ if(getModelElement() == null) {
setErrorMessage(Messages.UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
- boolean result = ViewService.getInstance().provides(
- new CreateDiagramViewOperation(
- new EObjectAdapter(getModelElement()),
- CompositeStructureDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
+ boolean result = ViewService.getInstance().provides(new CreateDiagramViewOperation(new EObjectAdapter(getModelElement()), CompositeStructureDiagramEditPart.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.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNodeDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNodeDescriptor.java
index 8065c7ce717..343d045df87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNodeDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNodeDescriptor.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java
index aa135f5d85a..673cc2777dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -26,9 +26,9 @@ import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
*/
public class UMLPaletteFactory extends PaletteFactory.Adapter {
- // RS: New Palette generation
- // Generates the ID for the tool elements
- // Generate the tool factory (if(ID) createtool...)
+ //RS: New Palette generation
+ //Generates the ID for the tool elements
+ //Generate the tool factory (if(ID) createtool...)
/**
* @generated
*/
@@ -122,6 +122,11 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
+ private final static String COMPOSITE_TOOL_STRINGEXPRESSION = "composite.tool.stringExpression";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
private final static String COMPOSITE_TOOL_LINK = "composite.tool.link";//$NON-NLS-1$
/**
@@ -177,102 +182,119 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- public UMLPaletteFactory() {
+ private final static String COMPOSITE_TOOL_MANIFESTATION = "composite.tool.manifestation";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String COMPOSITE_TOOL_DEPLOYMENT = "composite.tool.deployment";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public UMLPaletteFactory() {
}
/**
* @generated
*/
- @Override
public Tool createTool(String toolId) {
- if (toolId.equals(COMPOSITE_TOOL_CLASS)) {
+ if(toolId.equals(COMPOSITE_TOOL_CLASS)) {
return createClassCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_PROPERTY)) {
+ if(toolId.equals(COMPOSITE_TOOL_PROPERTY)) {
return createPropertyCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_PORT)) {
+ if(toolId.equals(COMPOSITE_TOOL_PORT)) {
return createPortCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_COLLABORATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_COLLABORATION)) {
return createCollaborationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_COLLABORATIONROLE)) {
+ if(toolId.equals(COMPOSITE_TOOL_COLLABORATIONROLE)) {
return createCollaborationRoleCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_COLLABORATIONUSE)) {
+ if(toolId.equals(COMPOSITE_TOOL_COLLABORATIONUSE)) {
return createCollaborationUseCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_COMMENT)) {
+ if(toolId.equals(COMPOSITE_TOOL_COMMENT)) {
return createCommentCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_CONSTRAINT)) {
+ if(toolId.equals(COMPOSITE_TOOL_CONSTRAINT)) {
return createConstraintCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_TIMEOBSERVATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_TIMEOBSERVATION)) {
return createTimeObservationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_DURATIONOBSERVATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_DURATIONOBSERVATION)) {
return createDurationObservationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_INFORMATIONITEM)) {
+ if(toolId.equals(COMPOSITE_TOOL_INFORMATIONITEM)) {
return createInformationItemCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_PARAMETER)) {
+ if(toolId.equals(COMPOSITE_TOOL_PARAMETER)) {
return createParameterCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_ACTIVITY)) {
+ if(toolId.equals(COMPOSITE_TOOL_ACTIVITY)) {
return createActivityCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_INTERACTION)) {
+ if(toolId.equals(COMPOSITE_TOOL_INTERACTION)) {
return createInteractionCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_PROTOCOLSTATEMACHINE)) {
+ if(toolId.equals(COMPOSITE_TOOL_PROTOCOLSTATEMACHINE)) {
return createProtocolStateMachineCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_STATEMACHINE)) {
+ if(toolId.equals(COMPOSITE_TOOL_STATEMACHINE)) {
return createStateMachineCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_FUNCTIONBEHAVIOR)) {
+ if(toolId.equals(COMPOSITE_TOOL_FUNCTIONBEHAVIOR)) {
return createFunctionBehaviorCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_OPAQUEBEHAVIOR)) {
+ if(toolId.equals(COMPOSITE_TOOL_OPAQUEBEHAVIOR)) {
return createOpaqueBehaviorCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_LINK)) {
+ if(toolId.equals(COMPOSITE_TOOL_STRINGEXPRESSION)) {
+ return createStringExpressionCreationTool();
+ }
+ if(toolId.equals(COMPOSITE_TOOL_LINK)) {
return createLinkCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_CONNECTOR)) {
+ if(toolId.equals(COMPOSITE_TOOL_CONNECTOR)) {
return createConnectorCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_ROLEBINDING)) {
+ if(toolId.equals(COMPOSITE_TOOL_ROLEBINDING)) {
return createRoleBindingCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_GENERALIZATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_GENERALIZATION)) {
return createGeneralizationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_REALIZATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_REALIZATION)) {
return createRealizationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_SUBSTITUTION)) {
+ if(toolId.equals(COMPOSITE_TOOL_SUBSTITUTION)) {
return createSubstitutionCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_ABSTRACTION)) {
+ if(toolId.equals(COMPOSITE_TOOL_ABSTRACTION)) {
return createAbstractionCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_USAGE)) {
+ if(toolId.equals(COMPOSITE_TOOL_USAGE)) {
return createUsageCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_DEPENDENCY)) {
+ if(toolId.equals(COMPOSITE_TOOL_DEPENDENCY)) {
return createDependencyCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_REPRESENTATION)) {
+ if(toolId.equals(COMPOSITE_TOOL_REPRESENTATION)) {
return createRepresentationCreationTool();
}
- if (toolId.equals(COMPOSITE_TOOL_INFORMATIONFLOW)) {
+ if(toolId.equals(COMPOSITE_TOOL_INFORMATIONFLOW)) {
return createInformationFlowCreationTool();
}
+ if(toolId.equals(COMPOSITE_TOOL_MANIFESTATION)) {
+ return createManifestationCreationTool();
+ }
+ if(toolId.equals(COMPOSITE_TOOL_DEPLOYMENT)) {
+ return createDeploymentCreationTool();
+ }
// default return: null
return null;
}
@@ -280,9 +302,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- @Override
public Object getTemplate(String templateId) {
-
// default return: null
return null;
}
@@ -481,6 +501,16 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
+ private Tool createStringExpressionCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.StringExpression_2100);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
private Tool createLinkCreationTool() {
List<IElementType> types = new ArrayList<IElementType>(4);
types.add(UMLElementTypes.CommentAnnotatedElement_4002);
@@ -590,4 +620,24 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
return tool;
}
+
+ /**
+ * @generated
+ */
+ private Tool createManifestationCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Manifestation_4012);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDeploymentCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Deployment_4009);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
index 3fa9611ffd9..69d5042ea29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -29,7 +29,7 @@ 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 {
@@ -43,8 +43,8 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getVisualID(View view) {
- if (view instanceof Diagram) {
- if (CompositeStructureDiagramEditPart.MODEL_ID.equals(view.getType())) {
+ if(view instanceof Diagram) {
+ if(CompositeStructureDiagramEditPart.MODEL_ID.equals(view.getType())) {
return CompositeStructureDiagramEditPart.VISUAL_ID;
} else {
return -1;
@@ -58,12 +58,12 @@ public class UMLVisualIDRegistry {
*/
public static String getModelID(View view) {
View diagram = view.getDiagram();
- while (view != diagram) {
+ while(view != diagram) {
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if (annotation != null) {
+ if(annotation != null) {
return annotation.getDetails().get("modelID"); //$NON-NLS-1$
}
- view = (View) view.eContainer();
+ view = (View)view.eContainer();
}
return diagram != null ? diagram.getType() : null;
}
@@ -75,7 +75,7 @@ public class UMLVisualIDRegistry {
try {
return Integer.parseInt(type);
} catch (NumberFormatException e) {
- if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
+ if(Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
}
}
@@ -93,7 +93,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if (domainElement == null) {
+ if(domainElement == null) {
return -1;
}
return 1000;
@@ -103,2487 +103,2487 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getNodeVisualID(View containerView, EObject domainElement) {
- if (domainElement == null) {
+ if(domainElement == null) {
return -1;
}
String containerModelID = org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ if(!CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
return -1;
}
int containerVisualID;
- if (CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ if(CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
containerVisualID = org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getVisualID(containerView);
} else {
- if (containerView instanceof Diagram) {
+ if(containerView instanceof Diagram) {
containerVisualID = CompositeStructureDiagramEditPart.VISUAL_ID;
} else {
return -1;
}
}
- switch (containerVisualID) {
+ switch(containerVisualID) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignalEvent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignalEvent().isSuperTypeOf(domainElement.eClass())) {
return SignalEventEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCallEvent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCallEvent().isSuperTypeOf(domainElement.eClass())) {
return CallEventEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getAnyReceiveEvent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getAnyReceiveEvent().isSuperTypeOf(domainElement.eClass())) {
return AnyReceiveEventEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getChangeEvent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getChangeEvent().isSuperTypeOf(domainElement.eClass())) {
return ChangeEventEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeEvent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeEvent().isSuperTypeOf(domainElement.eClass())) {
return TimeEventEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())) {
return DurationObservationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
return TimeObservationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getLiteralBoolean().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getLiteralBoolean().isSuperTypeOf(domainElement.eClass())) {
return LiteralBooleanEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getLiteralInteger().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getLiteralInteger().isSuperTypeOf(domainElement.eClass())) {
return LiteralIntegerEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getLiteralNull().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getLiteralNull().isSuperTypeOf(domainElement.eClass())) {
return LiteralNullEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getLiteralString().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getLiteralString().isSuperTypeOf(domainElement.eClass())) {
return LiteralStringEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getLiteralUnlimitedNatural().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getLiteralUnlimitedNatural().isSuperTypeOf(domainElement.eClass())) {
return LiteralUnlimitedNaturalEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStringExpression().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStringExpression().isSuperTypeOf(domainElement.eClass())) {
return StringExpressionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueExpression().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueExpression().isSuperTypeOf(domainElement.eClass())) {
return OpaqueExpressionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeExpression().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeExpression().isSuperTypeOf(domainElement.eClass())) {
return TimeExpressionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExpression().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExpression().isSuperTypeOf(domainElement.eClass())) {
return ExpressionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDuration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDuration().isSuperTypeOf(domainElement.eClass())) {
return DurationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeInterval().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeInterval().isSuperTypeOf(domainElement.eClass())) {
return TimeIntervalEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationInterval().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationInterval().isSuperTypeOf(domainElement.eClass())) {
return DurationIntervalEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterval().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterval().isSuperTypeOf(domainElement.eClass())) {
return IntervalEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInstanceValue().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInstanceValue().isSuperTypeOf(domainElement.eClass())) {
return InstanceValueEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPart.VISUAL_ID;
}
break;
case ActivityCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case InteractionCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case ProtocolStateMachineCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case StateMachineCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case FunctionBehaviorCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case OpaqueBehaviorCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case ComponentCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case DeviceCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case ExecutionEnvironmentCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case NodeCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case ClassCompositeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case EnumerationEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
return EnumerationLiteralEditPartCLN.VISUAL_ID;
}
break;
case PropertyPartEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case ActivityCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case InteractionCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case ProtocolStateMachineCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case StateMachineCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case FunctionBehaviorCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case OpaqueBehaviorCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
break;
case ComponentCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case DeviceCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case NodeCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case ClassCompositeEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElement.eClass())) {
return PortEditPart.VISUAL_ID;
}
break;
case EnumerationEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
return EnumerationLiteralEditPartCLN.VISUAL_ID;
}
break;
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
return PropertyEditPartCLN.VISUAL_ID;
}
break;
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
return OperationEditPartCLN.VISUAL_ID;
}
break;
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
return PropertyEditPartCLN.VISUAL_ID;
}
break;
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
return OperationEditPartCLN.VISUAL_ID;
}
break;
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
return EnumerationLiteralEditPartCLN.VISUAL_ID;
}
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
return EnumerationLiteralEditPartCLN.VISUAL_ID;
}
break;
case ActivityCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case InteractionCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case StateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ComponentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ClassCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case CollaborationCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConnectableElement().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConnectableElement().isSuperTypeOf(domainElement.eClass())) {
return CollaborationRoleEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ActivityCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case InteractionCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case StateMachineCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
return ParameterEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ComponentCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case NodeCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case ClassCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
return ActivityCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())) {
return InteractionCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getProtocolStateMachine().isSuperTypeOf(domainElement.eClass())) {
return ProtocolStateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getStateMachine().isSuperTypeOf(domainElement.eClass())) {
return StateMachineCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getFunctionBehavior().isSuperTypeOf(domainElement.eClass())) {
return FunctionBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getOpaqueBehavior().isSuperTypeOf(domainElement.eClass())) {
return OpaqueBehaviorCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
return ComponentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
return DeviceCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
return ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
return NodeCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
return ClassCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaboration().isSuperTypeOf(domainElement.eClass())) {
return CollaborationCompositeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElement.eClass())) {
return InterfaceEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())) {
return PrimitiveTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElement.eClass())) {
return EnumerationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getActor().isSuperTypeOf(domainElement.eClass())) {
return ActorEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeploymentSpecification().isSuperTypeOf(domainElement.eClass())) {
return DeploymentSpecificationEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
return ArtifactEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationItem().isSuperTypeOf(domainElement.eClass())) {
return InformationItemEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSignal().isSuperTypeOf(domainElement.eClass())) {
return SignalEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(domainElement.eClass())) {
return UseCaseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
break;
case CollaborationCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getCollaborationUse().isSuperTypeOf(domainElement.eClass())) {
return CollaborationUseEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConnectableElement().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConnectableElement().isSuperTypeOf(domainElement.eClass())) {
return CollaborationRoleEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
return DurationConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass())) {
return IntervalConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInteractionConstraint().isSuperTypeOf(domainElement.eClass())) {
return InteractionConstraintEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
return ConstraintEditPartCN.VISUAL_ID;
}
break;
case PropertyPartCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property) domainElement)) {
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass()) && isProperty_3070(containerView, (Property)domainElement)) {
return PropertyPartEditPartCN.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPartCN.VISUAL_ID;
}
break;
@@ -2596,3296 +2596,3296 @@ public class UMLVisualIDRegistry {
*/
public static boolean canCreateNode(View containerView, int nodeVisualID) {
String containerModelID = org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ if(!CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
return false;
}
int containerVisualID;
- if (CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ if(CompositeStructureDiagramEditPart.MODEL_ID.equals(containerModelID)) {
containerVisualID = org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getVisualID(containerView);
} else {
- if (containerView instanceof Diagram) {
+ if(containerView instanceof Diagram) {
containerVisualID = CompositeStructureDiagramEditPart.VISUAL_ID;
} else {
return false;
}
}
- switch (containerVisualID) {
+ switch(containerVisualID) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
- if (ActivityCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPart.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPart.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPart.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPart.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPart.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPart.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEventEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalEventEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CallEventEditPart.VISUAL_ID == nodeVisualID) {
+ if(CallEventEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (AnyReceiveEventEditPart.VISUAL_ID == nodeVisualID) {
+ if(AnyReceiveEventEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ChangeEventEditPart.VISUAL_ID == nodeVisualID) {
+ if(ChangeEventEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeEventEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeEventEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationObservationEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationObservationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeObservationEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeObservationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralBooleanEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralBooleanEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralIntegerEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralIntegerEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralNullEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralNullEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralStringEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralStringEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralUnlimitedNaturalEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralUnlimitedNaturalEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StringExpressionEditPart.VISUAL_ID == nodeVisualID) {
+ if(StringExpressionEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueExpressionEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueExpressionEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeExpressionEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeExpressionEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExpressionEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExpressionEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeIntervalEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeIntervalEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationIntervalEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationIntervalEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InstanceValueEditPart.VISUAL_ID == nodeVisualID) {
+ if(InstanceValueEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPart.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActivityCompositeEditPart.VISUAL_ID:
- if (ActivityCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionCompositeEditPart.VISUAL_ID:
- if (InteractionCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ProtocolStateMachineCompositeEditPart.VISUAL_ID:
- if (ProtocolStateMachineCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case StateMachineCompositeEditPart.VISUAL_ID:
- if (StateMachineCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case FunctionBehaviorCompositeEditPart.VISUAL_ID:
- if (FunctionBehaviorCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case OpaqueBehaviorCompositeEditPart.VISUAL_ID:
- if (OpaqueBehaviorCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ComponentCompositeEditPart.VISUAL_ID:
- if (ComponentCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeviceCompositeEditPart.VISUAL_ID:
- if (DeviceCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ExecutionEnvironmentCompositeEditPart.VISUAL_ID:
- if (ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case NodeCompositeEditPart.VISUAL_ID:
- if (NodeCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ClassCompositeEditPart.VISUAL_ID:
- if (ClassCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationCompositeEditPart.VISUAL_ID:
- if (CollaborationCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InterfaceEditPart.VISUAL_ID:
- if (InterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(InterfaceFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case PrimitiveTypeEditPart.VISUAL_ID:
- if (PrimitiveTypeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case EnumerationEditPart.VISUAL_ID:
- if (EnumerationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(EnumerationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(EnumerationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeEditPart.VISUAL_ID:
- if (DataTypeNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DataTypeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DataTypeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(DataTypeAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeOperationCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ if(DataTypeOperationCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActorEditPart.VISUAL_ID:
- if (ActorNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActorNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ActorFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeploymentSpecificationEditPart.VISUAL_ID:
- if (DeploymentSpecificationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ArtifactEditPart.VISUAL_ID:
- if (ArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ArtifactFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InformationItemEditPart.VISUAL_ID:
- if (InformationItemNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InformationItemNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(InformationItemFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case SignalEditPart.VISUAL_ID:
- if (SignalNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case UseCaseEditPart.VISUAL_ID:
- if (UseCaseNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(UseCaseNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(UseCaseFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case SignalEventEditPart.VISUAL_ID:
- if (SignalEventNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalEventNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(SignalEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CallEventEditPart.VISUAL_ID:
- if (CallEventNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(CallEventNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CallEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(CallEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case AnyReceiveEventEditPart.VISUAL_ID:
- if (AnyReceiveEventNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(AnyReceiveEventNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (AnyReceiveEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(AnyReceiveEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ChangeEventEditPart.VISUAL_ID:
- if (ChangeEventNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ChangeEventNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ChangeEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ChangeEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeEventEditPart.VISUAL_ID:
- if (TimeEventNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeEventNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeEventFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DurationObservationEditPart.VISUAL_ID:
- if (DurationObservationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationObservationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeObservationEditPart.VISUAL_ID:
- if (TimeObservationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeObservationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case LiteralBooleanEditPart.VISUAL_ID:
- if (LiteralBooleanNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralBooleanNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralBooleanFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralBooleanFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case LiteralIntegerEditPart.VISUAL_ID:
- if (LiteralIntegerNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralIntegerNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralIntegerFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralIntegerFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case LiteralNullEditPart.VISUAL_ID:
- if (LiteralNullNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralNullNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralNullFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralNullFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case LiteralStringEditPart.VISUAL_ID:
- if (LiteralStringNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralStringNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralStringFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralStringFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case LiteralUnlimitedNaturalEditPart.VISUAL_ID:
- if (LiteralUnlimitedNaturalNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralUnlimitedNaturalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case StringExpressionEditPart.VISUAL_ID:
- if (StringExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(StringExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StringExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(StringExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case OpaqueExpressionEditPart.VISUAL_ID:
- if (OpaqueExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(OpaqueExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeExpressionEditPart.VISUAL_ID:
- if (TimeExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ExpressionEditPart.VISUAL_ID:
- if (ExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExpressionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(ExpressionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DurationEditPart.VISUAL_ID:
- if (DurationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeIntervalEditPart.VISUAL_ID:
- if (TimeIntervalNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeIntervalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeIntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeIntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DurationIntervalEditPart.VISUAL_ID:
- if (DurationIntervalNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationIntervalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationIntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationIntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case IntervalEditPart.VISUAL_ID:
- if (IntervalNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InstanceValueEditPart.VISUAL_ID:
- if (InstanceValueNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InstanceValueNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InstanceValueFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(InstanceValueFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CommentEditPart.VISUAL_ID:
- if (CommentBodyEditPart.VISUAL_ID == nodeVisualID) {
+ if(CommentBodyEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DurationConstraintEditPart.VISUAL_ID:
- if (DurationConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeConstraintEditPart.VISUAL_ID:
- if (TimeConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case IntervalConstraintEditPart.VISUAL_ID:
- if (IntervalConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionConstraintEditPart.VISUAL_ID:
- if (InteractionConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ConstraintEditPart.VISUAL_ID:
- if (ConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case BehaviorPortEditPart.VISUAL_ID:
- if (BehaviorPortFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(BehaviorPortFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case PortEditPart.VISUAL_ID:
- if (PortNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ParameterEditPart.VISUAL_ID:
- if (ParameterNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case PropertyPartEditPartCN.VISUAL_ID:
- if (PropertyPartNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationRoleEditPartCN.VISUAL_ID:
- if (CollaborationRoleNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationRoleNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationUseEditPartCN.VISUAL_ID:
- if (CollaborationUseNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActivityCompositeEditPartCN.VISUAL_ID:
- if (ActivityCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionCompositeEditPartCN.VISUAL_ID:
- if (InteractionCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ProtocolStateMachineCompositeEditPartCN.VISUAL_ID:
- if (ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case StateMachineCompositeEditPartCN.VISUAL_ID:
- if (StateMachineCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case FunctionBehaviorCompositeEditPartCN.VISUAL_ID:
- if (FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case OpaqueBehaviorCompositeEditPartCN.VISUAL_ID:
- if (OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ComponentCompositeEditPartCN.VISUAL_ID:
- if (ComponentCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeviceCompositeEditPartCN.VISUAL_ID:
- if (DeviceCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID:
- if (ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case NodeCompositeEditPartCN.VISUAL_ID:
- if (NodeCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ClassCompositeEditPartCN.VISUAL_ID:
- if (ClassCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PortEditPart.VISUAL_ID == nodeVisualID) {
+ if(PortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationCompositeEditPartCN.VISUAL_ID:
- if (CollaborationCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InterfaceEditPartCN.VISUAL_ID:
- if (InterfaceNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
- if (PrimitiveTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case EnumerationEditPartCN.VISUAL_ID:
- if (EnumerationNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeEditPartCN.VISUAL_ID:
- if (DataTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeOperationCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeOperationCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActorEditPartCN.VISUAL_ID:
- if (ActorNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeploymentSpecificationEditPartCN.VISUAL_ID:
- if (DeploymentSpecificationNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ArtifactEditPartCN.VISUAL_ID:
- if (ArtifactNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InformationItemEditPartCN.VISUAL_ID:
- if (InformationItemNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case SignalEditPartCN.VISUAL_ID:
- if (SignalNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case UseCaseEditPartCN.VISUAL_ID:
- if (UseCaseNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CommentEditPartCN.VISUAL_ID:
- if (CommentBodyEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentBodyEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DurationConstraintEditPartCN.VISUAL_ID:
- if (DurationConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case TimeConstraintEditPartCN.VISUAL_ID:
- if (TimeConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case IntervalConstraintEditPartCN.VISUAL_ID:
- if (IntervalConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionConstraintEditPartCN.VISUAL_ID:
- if (InteractionConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ConstraintEditPartCN.VISUAL_ID:
- if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
- if (PropertyEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(PropertyEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
- if (OperationEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(OperationEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(PropertyEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
- if (OperationEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(OperationEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
- if (EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
- if (EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationLiteralEditPartCLN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActivityCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case StateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ComponentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ClassCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (BehaviorPortEditPart.VISUAL_ID == nodeVisualID) {
+ if(BehaviorPortEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationCompositeCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationRoleEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationRoleEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ActivityCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InteractionCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case StateMachineCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ if(ParameterEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ComponentCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case NodeCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ClassCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActivityCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(StateMachineCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(FunctionBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ComponentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeviceCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(NodeCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ClassCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationCompositeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InterfaceEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ActorEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ActorEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DeploymentSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InformationItemEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SignalEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(SignalEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(UseCaseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case CollaborationCompositeCompartmentEditPart.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationUseEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CollaborationRoleEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CollaborationRoleEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DurationConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(TimeConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(IntervalConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(InteractionConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case PropertyPartCompartmentEditPartCN.VISUAL_ID:
- if (PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PropertyPartEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ComponentRealizationEditPart.VISUAL_ID:
- if (ComponentRealizationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentRealizationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InterfaceRealizationEditPart.VISUAL_ID:
- if (InterfaceRealizationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(InterfaceRealizationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case SubstitutionEditPart.VISUAL_ID:
- if (SubstitutionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(SubstitutionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (SubstitutionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(SubstitutionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case RealizationEditPart.VISUAL_ID:
- if (RealizationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(RealizationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (RealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(RealizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ManifestationEditPart.VISUAL_ID:
- if (ManifestationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ManifestationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ManifestationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ManifestationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case AbstractionEditPart.VISUAL_ID:
- if (AbstractionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(AbstractionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (AbstractionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(AbstractionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case UsageEditPart.VISUAL_ID:
- if (UsageNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(UsageNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (UsageAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(UsageAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DeploymentEditPart.VISUAL_ID:
- if (DeploymentNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeploymentNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DeploymentAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(DeploymentAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case RoleBindingEditPart.VISUAL_ID:
- if (RoleBindingRoleNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(RoleBindingRoleNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (RoleBindingAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(RoleBindingAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case DependencyEditPart.VISUAL_ID:
- if (DependencyNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(DependencyNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (DependencyAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(DependencyAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ConnectorEditPart.VISUAL_ID:
- if (ConnectorAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConnectorAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConnectorNameEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConnectorNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConnectorMultiplicitySourceEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConnectorMultiplicitySourceEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (ConnectorMultiplicityTargetEditPart.VISUAL_ID == nodeVisualID) {
+ if(ConnectorMultiplicityTargetEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case GeneralizationEditPart.VISUAL_ID:
- if (GeneralizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(GeneralizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case RepresentationEditPart.VISUAL_ID:
- if (RepresentationTagLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(RepresentationTagLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case InformationFlowEditPart.VISUAL_ID:
- if (InformationFlowConveyedLabelEditPart.VISUAL_ID == nodeVisualID) {
+ if(InformationFlowConveyedLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
- if (InformationFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ if(InformationFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
break;
@@ -5897,46 +5897,46 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getLinkWithClassVisualID(EObject domainElement) {
- if (domainElement == null) {
+ if(domainElement == null) {
return -1;
}
- if (UMLPackage.eINSTANCE.getComponentRealization().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getComponentRealization().isSuperTypeOf(domainElement.eClass())) {
return ComponentRealizationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(domainElement.eClass())) {
return InterfaceRealizationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getSubstitution().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getSubstitution().isSuperTypeOf(domainElement.eClass())) {
return SubstitutionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getRealization().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getRealization().isSuperTypeOf(domainElement.eClass())) {
return RealizationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getManifestation().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getManifestation().isSuperTypeOf(domainElement.eClass())) {
return ManifestationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getAbstraction().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getAbstraction().isSuperTypeOf(domainElement.eClass())) {
return AbstractionEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getUsage().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getUsage().isSuperTypeOf(domainElement.eClass())) {
return UsageEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDeployment().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getDeployment().isSuperTypeOf(domainElement.eClass())) {
return DeploymentEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass()) && isDependency_4017((Dependency) domainElement)) {
+ if(UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass()) && isDependency_4017((Dependency)domainElement)) {
return RoleBindingEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass()) && isDependency_4010((Dependency) domainElement)) {
+ if(UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass()) && isDependency_4010((Dependency)domainElement)) {
return DependencyEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getConnector().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getConnector().isSuperTypeOf(domainElement.eClass())) {
return ConnectorEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
return GeneralizationEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getInformationFlow().isSuperTypeOf(domainElement.eClass())) {
+ if(UMLPackage.eINSTANCE.getInformationFlow().isSuperTypeOf(domainElement.eClass())) {
return InformationFlowEditPart.VISUAL_ID;
}
return -1;
@@ -5945,7 +5945,7 @@ public class UMLVisualIDRegistry {
/**
* User can change implementation of this method to handle some specific
* situations not covered by default logic.
- *
+ *
* @generated
*/
private static boolean isDiagram(Package element) {
@@ -5956,19 +5956,18 @@ public class UMLVisualIDRegistry {
* @generated
*/
private static boolean isProperty_3070(View containerView, Property domainElement) {
- // Property / CollaborationRole constraint
+ // Property / CollaborationRole constraint
// Restriction for the case where domainElement owner is a Collaboration
// If the domainElement is not referenced as one of its owner role
// then it should be considered as a Property creation on Collaboration,
// else the test should return false and be considered as a representation of
// a collaboration role (ConnectableElement).
- if (containerView.getElement() instanceof Collaboration) {
- Collaboration graphicalParent = (Collaboration) containerView.getElement();
- if (graphicalParent.getCollaborationRoles().contains(domainElement)) {
+ if(containerView.getElement() instanceof Collaboration) {
+ Collaboration graphicalParent = (Collaboration)containerView.getElement();
+ if(graphicalParent.getCollaborationRoles().contains(domainElement)) {
return false;
}
}
-
// General case : no restriction
return true;
}
@@ -5978,9 +5977,9 @@ public class UMLVisualIDRegistry {
*/
private static boolean isDependency_4017(Dependency domainElement) {
// Test if the dependency is a RoleBinding
- if (domainElement.getOwner() instanceof CollaborationUse) {
- CollaborationUse owner = (CollaborationUse) domainElement.getOwner();
- if (owner.getRoleBindings().contains(domainElement)) {
+ if(domainElement.getOwner() instanceof CollaborationUse) {
+ CollaborationUse owner = (CollaborationUse)domainElement.getOwner();
+ if(owner.getRoleBindings().contains(domainElement)) {
return true;
}
}
@@ -5992,9 +5991,9 @@ public class UMLVisualIDRegistry {
*/
private static boolean isDependency_4010(Dependency domainElement) {
// Test if the dependency is not a RoleBinding
- if (domainElement.getOwner() instanceof CollaborationUse) {
- CollaborationUse owner = (CollaborationUse) domainElement.getOwner();
- if (owner.getRoleBindings().contains(domainElement)) {
+ if(domainElement.getOwner() instanceof CollaborationUse) {
+ CollaborationUse owner = (CollaborationUse)domainElement.getOwner();
+ if(owner.getRoleBindings().contains(domainElement)) {
return false;
}
}
@@ -6005,8 +6004,8 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
- if (candidate == -1) {
- // unrecognized id is always bad
+ if(candidate == -1) {
+ //unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
@@ -6017,7 +6016,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static boolean isCompartmentVisualID(int visualID) {
- switch (visualID) {
+ switch(visualID) {
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
@@ -6060,7 +6059,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static boolean isSemanticLeafVisualID(int visualID) {
- switch (visualID) {
+ switch(visualID) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
return false;
case PrimitiveTypeEditPart.VISUAL_ID:
@@ -6131,6 +6130,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
+
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java
index f389e5c3fd8..205831521a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -71,22 +71,18 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- @Override
public void run() {
IWorkbenchPart workbenchPart = page.getActivePart();
- if (workbenchPart instanceof IDiagramWorkbenchPart) {
- final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
+ if(workbenchPart instanceof IDiagramWorkbenchPart) {
+ final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart)workbenchPart;
try {
- new WorkspaceModifyDelegatingOperation(
- new IRunnableWithProgress() {
+ new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor)
- throws InterruptedException, InvocationTargetException {
- runValidation(part.getDiagramEditPart(), part.getDiagram());
- }
- })
- .run(new NullProgressMonitor());
+ @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$
}
@@ -98,12 +94,10 @@ public class ValidateAction extends Action {
*/
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);
+ if(UMLDiagramEditorUtil.openDiagram(view.eResource())) {
+ IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editorPart instanceof IDiagramWorkbenchPart) {
+ runValidation(((IDiagramWorkbenchPart)editorPart).getDiagramEditPart(), view);
} else {
runNonUIValidation(view);
}
@@ -118,13 +112,10 @@ public class ValidateAction extends Action {
*/
public static void runNonUIValidation(View view) {
Shell shell = Display.getCurrent().getActiveShell();
- if (shell == null) {
+ if(shell == null) {
shell = new Shell();
}
-
- DiagramEditPart diagramEditPart =
- OffscreenEditPartFactory.getInstance().createDiagramEditPart(
- view.getDiagram(), shell);
+ DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
@@ -148,7 +139,7 @@ public class ValidateAction extends Action {
* @generated
*/
private static Diagnostic runEMFValidator(View target) {
- if (target.isSetElement() && target.getElement() != null) {
+ if(target.isSetElement() && target.getElement() != null) {
return new Diagnostician() {
@Override
@@ -164,19 +155,15 @@ public class ValidateAction extends Action {
* @generated
*/
private static void validate(DiagramEditPart diagramEditPart, View view) {
- IFile target = view.eResource() != null ?
- WorkspaceSynchronizer.getFile(view.eResource()) : null;
- if (target != null) {
+ 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);
+ IBatchValidator validator = (IBatchValidator)ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(true);
- if (view.isSetElement() && view.getElement() != null) {
+ if(view.isSetElement() && view.getElement() != null) {
IStatus status = validator.validate(view.getElement());
createMarkers(target, status, diagramEditPart);
}
@@ -185,51 +172,37 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static void createMarkers(IFile
- target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
- if (validationStatus.isOK()) {
+ 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());
+ 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) {
+ 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();) {
+ 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()));
+ 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()));
}
}
}
@@ -237,27 +210,24 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static void addMarker(EditPartViewer viewer, IFile
- target, String elementId, String location, String message, int statusSeverity) {
- if (target == null) {
+ 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);
+ UMLMarkerNavigationProvider.addMarker(target, elementId, location, message, statusSeverity);
}
/**
* @generated
*/
private static int diagnosticToStatusSeverity(int diagnosticSeverity) {
- if (diagnosticSeverity == Diagnostic.OK) {
+ if(diagnosticSeverity == Diagnostic.OK) {
return IStatus.OK;
- } else if (diagnosticSeverity == Diagnostic.INFO) {
+ } else if(diagnosticSeverity == Diagnostic.INFO) {
return IStatus.INFO;
- } else if (diagnosticSeverity == Diagnostic.WARNING) {
+ } else if(diagnosticSeverity == Diagnostic.WARNING) {
return IStatus.WARNING;
- } else if (diagnosticSeverity == Diagnostic.ERROR
- || diagnosticSeverity == Diagnostic.CANCEL) {
+ } else if(diagnosticSeverity == Diagnostic.ERROR || diagnosticSeverity == Diagnostic.CANCEL) {
return IStatus.ERROR;
}
return IStatus.INFO;
@@ -267,13 +237,13 @@ public class ValidateAction extends Action {
* @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 instanceof IConstraintStatus) {
+ targetElementCollector.add(((IConstraintStatus)status).getTarget());
+ allConstraintStatuses.add((IConstraintStatus)status);
}
- if (status.isMultiStatus()) {
+ if(status.isMultiStatus()) {
IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
+ for(int i = 0; i < children.length; i++) {
collectTargetElements(children[i], targetElementCollector, allConstraintStatuses);
}
}
@@ -286,15 +256,14 @@ public class ValidateAction extends Action {
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);
+ 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);
+ 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.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramAppearancePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramAppearancePreferencePage.java
index 767d6fe1560..7598c57d08e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramAppearancePreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramAppearancePreferencePage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramConnectionsPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramConnectionsPreferencePage.java
index 38f0f66b7e6..6eb65b2edf2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramConnectionsPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramConnectionsPreferencePage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramGeneralPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramGeneralPreferencePage.java
index ea1e9349363..5fd97c2931a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramGeneralPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramGeneralPreferencePage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java
index c0e72ad7994..c1212cb14e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java
@@ -1,22 +1,17 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.composite.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
@@ -28,15 +23,13 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer
/**
* @generated
*/
- @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = getPreferenceStore();
- DiagramsPreferencePage.initDefaults(store);
- AppearancePreferencePage.initDefaults(store);
- ConnectionsPreferencePage.initDefaults(store);
- PrintingPreferencePage.initDefaults(store);
- RulerGridPreferencePage.initDefaults(store);
-
+ DiagramGeneralPreferencePage.initDefaults(store);
+ DiagramAppearancePreferencePage.initDefaults(store);
+ DiagramConnectionsPreferencePage.initDefaults(store);
+ DiagramPrintingPreferencePage.initDefaults(store);
+ DiagramRulersAndGridPreferencePage.initDefaults(store);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPrintingPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPrintingPreferencePage.java
index 525ec4343bb..cd895de9451 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPrintingPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPrintingPreferencePage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramRulersAndGridPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramRulersAndGridPreferencePage.java
index 6191193169f..364930abff9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramRulersAndGridPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramRulersAndGridPreferencePage.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java
index c58a3fc8aa7..d8b40697b31 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLEditPartProvider.java
index 29cb127f9eb..92f285b4f4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLEditPartProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -25,8 +25,6 @@ public class UMLEditPartProvider extends DefaultEditPartProvider {
* @generated
*/
public UMLEditPartProvider() {
- super(new UMLEditPartFactory(),
- UMLVisualIDRegistry.TYPED_INSTANCE,
- CompositeStructureDiagramEditPart.MODEL_ID);
+ super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, CompositeStructureDiagramEditPart.MODEL_ID);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java
index e1ec1614527..1ef0c13234f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -327,7 +327,7 @@ public class UMLElementTypes {
/**
* @generated
*/
- public static final IElementType ConnectableElement_3115 = getElementType("org.eclipse.papyrus.uml.diagram.composite.prototype.CollaborationRole_3115"); //$NON-NLS-1$
+ public static final IElementType ConnectableElement_3115 = getElementType("org.eclipse.papyrus.uml.diagram.composite.CollaborationRole_3115"); //$NON-NLS-1$
/**
* @generated
@@ -619,318 +619,116 @@ public class UMLElementTypes {
/**
* Returns 'type' of the ecore object associated with the hint.
- *
+ *
* @generated
*/
public static synchronized ENamedElement getElement(IAdaptable hint) {
Object type = hint.getAdapter(IElementType.class);
- if (elements == null) {
+ if(elements == null) {
elements = new IdentityHashMap<IElementType, ENamedElement>();
-
elements.put(Package_1000, UMLPackage.eINSTANCE.getPackage());
-
-
elements.put(Activity_2060, UMLPackage.eINSTANCE.getActivity());
-
-
elements.put(Interaction_2061, UMLPackage.eINSTANCE.getInteraction());
-
-
elements.put(ProtocolStateMachine_2062, UMLPackage.eINSTANCE.getProtocolStateMachine());
-
-
elements.put(StateMachine_2063, UMLPackage.eINSTANCE.getStateMachine());
-
-
elements.put(FunctionBehavior_2064, UMLPackage.eINSTANCE.getFunctionBehavior());
-
-
elements.put(OpaqueBehavior_2065, UMLPackage.eINSTANCE.getOpaqueBehavior());
-
-
elements.put(Component_2069, UMLPackage.eINSTANCE.getComponent());
-
-
elements.put(Device_2070, UMLPackage.eINSTANCE.getDevice());
-
-
elements.put(ExecutionEnvironment_2071, UMLPackage.eINSTANCE.getExecutionEnvironment());
-
-
elements.put(Node_2072, UMLPackage.eINSTANCE.getNode());
-
-
elements.put(Class_2073, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Collaboration_2075, UMLPackage.eINSTANCE.getCollaboration());
-
-
elements.put(Interface_2076, UMLPackage.eINSTANCE.getInterface());
-
-
elements.put(PrimitiveType_2066, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(Enumeration_2067, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_2068, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Actor_2077, UMLPackage.eINSTANCE.getActor());
-
-
elements.put(DeploymentSpecification_2078, UMLPackage.eINSTANCE.getDeploymentSpecification());
-
-
elements.put(Artifact_2079, UMLPackage.eINSTANCE.getArtifact());
-
-
elements.put(InformationItem_2080, UMLPackage.eINSTANCE.getInformationItem());
-
-
elements.put(Signal_2081, UMLPackage.eINSTANCE.getSignal());
-
-
elements.put(UseCase_2082, UMLPackage.eINSTANCE.getUseCase());
-
-
elements.put(SignalEvent_2083, UMLPackage.eINSTANCE.getSignalEvent());
-
-
elements.put(CallEvent_2084, UMLPackage.eINSTANCE.getCallEvent());
-
-
elements.put(AnyReceiveEvent_2085, UMLPackage.eINSTANCE.getAnyReceiveEvent());
-
-
elements.put(ChangeEvent_2088, UMLPackage.eINSTANCE.getChangeEvent());
-
-
elements.put(TimeEvent_2089, UMLPackage.eINSTANCE.getTimeEvent());
-
-
elements.put(DurationObservation_2093, UMLPackage.eINSTANCE.getDurationObservation());
-
-
elements.put(TimeObservation_2094, UMLPackage.eINSTANCE.getTimeObservation());
-
-
elements.put(LiteralBoolean_2095, UMLPackage.eINSTANCE.getLiteralBoolean());
-
-
elements.put(LiteralInteger_2096, UMLPackage.eINSTANCE.getLiteralInteger());
-
-
elements.put(LiteralNull_2097, UMLPackage.eINSTANCE.getLiteralNull());
-
-
elements.put(LiteralString_2098, UMLPackage.eINSTANCE.getLiteralString());
-
-
elements.put(LiteralUnlimitedNatural_2099, UMLPackage.eINSTANCE.getLiteralUnlimitedNatural());
-
-
elements.put(StringExpression_2100, UMLPackage.eINSTANCE.getStringExpression());
-
-
elements.put(OpaqueExpression_2101, UMLPackage.eINSTANCE.getOpaqueExpression());
-
-
elements.put(TimeExpression_2102, UMLPackage.eINSTANCE.getTimeExpression());
-
-
elements.put(Expression_2103, UMLPackage.eINSTANCE.getExpression());
-
-
elements.put(Duration_2104, UMLPackage.eINSTANCE.getDuration());
-
-
elements.put(TimeInterval_2105, UMLPackage.eINSTANCE.getTimeInterval());
-
-
elements.put(DurationInterval_2106, UMLPackage.eINSTANCE.getDurationInterval());
-
-
elements.put(Interval_2107, UMLPackage.eINSTANCE.getInterval());
-
-
elements.put(InstanceValue_2108, UMLPackage.eINSTANCE.getInstanceValue());
-
-
elements.put(Comment_2109, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(DurationConstraint_2110, UMLPackage.eINSTANCE.getDurationConstraint());
-
-
elements.put(TimeConstraint_2111, UMLPackage.eINSTANCE.getTimeConstraint());
-
-
elements.put(IntervalConstraint_2112, UMLPackage.eINSTANCE.getIntervalConstraint());
-
-
elements.put(InteractionConstraint_2113, UMLPackage.eINSTANCE.getInteractionConstraint());
-
-
elements.put(Constraint_2114, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Port_3069, UMLPackage.eINSTANCE.getPort());
-
-
elements.put(Parameter_3088, UMLPackage.eINSTANCE.getParameter());
-
-
elements.put(Property_3070, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(ConnectableElement_3115, UMLPackage.eINSTANCE.getConnectableElement());
-
-
elements.put(CollaborationUse_3071, UMLPackage.eINSTANCE.getCollaborationUse());
-
-
elements.put(Activity_3072, UMLPackage.eINSTANCE.getActivity());
-
-
elements.put(Interaction_3073, UMLPackage.eINSTANCE.getInteraction());
-
-
elements.put(ProtocolStateMachine_3074, UMLPackage.eINSTANCE.getProtocolStateMachine());
-
-
elements.put(StateMachine_3075, UMLPackage.eINSTANCE.getStateMachine());
-
-
elements.put(FunctionBehavior_3076, UMLPackage.eINSTANCE.getFunctionBehavior());
-
-
elements.put(OpaqueBehavior_3077, UMLPackage.eINSTANCE.getOpaqueBehavior());
-
-
elements.put(Component_3081, UMLPackage.eINSTANCE.getComponent());
-
-
elements.put(Device_3082, UMLPackage.eINSTANCE.getDevice());
-
-
elements.put(ExecutionEnvironment_3083, UMLPackage.eINSTANCE.getExecutionEnvironment());
-
-
elements.put(Node_3084, UMLPackage.eINSTANCE.getNode());
-
-
elements.put(Class_3085, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Collaboration_3086, UMLPackage.eINSTANCE.getCollaboration());
-
-
elements.put(Interface_3087, UMLPackage.eINSTANCE.getInterface());
-
-
elements.put(PrimitiveType_3078, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(Enumeration_3079, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_3080, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Actor_3091, UMLPackage.eINSTANCE.getActor());
-
-
elements.put(DeploymentSpecification_3092, UMLPackage.eINSTANCE.getDeploymentSpecification());
-
-
elements.put(Artifact_3093, UMLPackage.eINSTANCE.getArtifact());
-
-
elements.put(InformationItem_3094, UMLPackage.eINSTANCE.getInformationItem());
-
-
elements.put(Signal_3095, UMLPackage.eINSTANCE.getSignal());
-
-
elements.put(UseCase_3096, UMLPackage.eINSTANCE.getUseCase());
-
-
elements.put(Comment_3097, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(DurationConstraint_3116, UMLPackage.eINSTANCE.getDurationConstraint());
-
-
elements.put(TimeConstraint_3117, UMLPackage.eINSTANCE.getTimeConstraint());
-
-
elements.put(IntervalConstraint_3118, UMLPackage.eINSTANCE.getIntervalConstraint());
-
-
elements.put(InteractionConstraint_3119, UMLPackage.eINSTANCE.getInteractionConstraint());
-
-
elements.put(Constraint_3120, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Property_3101, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Operation_3102, UMLPackage.eINSTANCE.getOperation());
-
-
elements.put(EnumerationLiteral_3066, UMLPackage.eINSTANCE.getEnumerationLiteral());
-
elements.put(CommentAnnotatedElement_4002, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
-
elements.put(ConstraintConstrainedElement_4003, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
-
-
elements.put(ComponentRealization_4004, UMLPackage.eINSTANCE.getComponentRealization());
-
-
elements.put(InterfaceRealization_4005, UMLPackage.eINSTANCE.getInterfaceRealization());
-
-
elements.put(Substitution_4011, UMLPackage.eINSTANCE.getSubstitution());
-
-
elements.put(Realization_4006, UMLPackage.eINSTANCE.getRealization());
-
-
elements.put(Manifestation_4012, UMLPackage.eINSTANCE.getManifestation());
-
-
elements.put(Abstraction_4007, UMLPackage.eINSTANCE.getAbstraction());
-
-
elements.put(Usage_4008, UMLPackage.eINSTANCE.getUsage());
-
-
elements.put(Deployment_4009, UMLPackage.eINSTANCE.getDeployment());
-
-
elements.put(Dependency_4017, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Dependency_4010, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Connector_4013, UMLPackage.eINSTANCE.getConnector());
-
-
elements.put(Generalization_4015, UMLPackage.eINSTANCE.getGeneralization());
-
elements.put(TimeObservationEvent_4018, UMLPackage.eINSTANCE.getTimeObservation_Event());
-
elements.put(DurationObservationEvent_4019, UMLPackage.eINSTANCE.getDurationObservation_Event());
-
elements.put(InformationItemRepresented_4020, UMLPackage.eINSTANCE.getInformationItem_Represented());
-
-
elements.put(InformationFlow_4021, UMLPackage.eINSTANCE.getInformationFlow());
}
return elements.get(type);
@@ -947,7 +745,7 @@ public class UMLElementTypes {
* @generated
*/
public static synchronized boolean isKnownElementType(IElementType elementType) {
- if (KNOWN_ELEMENT_TYPES == null) {
+ if(KNOWN_ELEMENT_TYPES == null) {
KNOWN_ELEMENT_TYPES = new HashSet<IElementType>();
KNOWN_ELEMENT_TYPES.add(Package_1000);
KNOWN_ELEMENT_TYPES.add(Activity_2060);
@@ -1057,14 +855,21 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(InformationItemRepresented_4020);
KNOWN_ELEMENT_TYPES.add(InformationFlow_4021);
}
- return KNOWN_ELEMENT_TYPES.contains(elementType);
+ boolean result = KNOWN_ELEMENT_TYPES.contains(elementType);
+ if(!result) {
+ IElementType[] supertypes = elementType.getAllSuperTypes();
+ for(int i = 0; !result && (i < supertypes.length); i++) {
+ result = KNOWN_ELEMENT_TYPES.contains(supertypes[i]);
+ }
+ }
+ return result;
}
/**
* @generated
*/
public static IElementType getElementType(int visualID) {
- switch (visualID) {
+ switch(visualID) {
case CompositeStructureDiagramEditPart.VISUAL_ID:
return Package_1000;
case ActivityCompositeEditPart.VISUAL_ID:
@@ -1312,4 +1117,18 @@ public class UMLElementTypes {
return org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes.getElement(elementTypeAdapter);
}
};
+
+ /**
+ * @generated
+ */
+ public static boolean isKindOf(IElementType subtype, IElementType supertype) {
+ boolean result = subtype == supertype;
+ if(!result) {
+ IElementType[] supertypes = subtype.getAllSuperTypes();
+ for(int i = 0; !result && (i < supertypes.length); i++) {
+ result = supertype == supertypes[i];
+ }
+ }
+ return result;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLIconProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLIconProvider.java
index 5cdb4c04ad8..f3a93eefb3a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLIconProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLIconProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLMarkerNavigationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLMarkerNavigationProvider.java
index 6a5a870b8a3..eb6b08dbd36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLMarkerNavigationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLMarkerNavigationProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -39,23 +39,20 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr
/**
* @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)) {
+ if(elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
- DiagramEditor editor =
- (DiagramEditor) getEditor();
+ DiagramEditor editor = (DiagramEditor)getEditor();
Map<?, ?> editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
- if (targetView == null) {
+ if(targetView == null) {
return;
}
- EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
- if (targetEditPart != null) {
- UMLDiagramEditorUtil.selectElementsInDiagram(
- editor, Arrays.asList(new EditPart[] { targetEditPart }));
+ EditPart targetEditPart = (EditPart)editPartRegistry.get(targetView);
+ if(targetEditPart != null) {
+ UMLDiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[]{ targetEditPart }));
}
}
@@ -81,10 +78,9 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr
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) {
+ if(statusSeverity == IStatus.WARNING) {
markerSeverity = IMarker.SEVERITY_WARNING;
- } else if (statusSeverity == IStatus.ERROR ||
- statusSeverity == IStatus.CANCEL) {
+ } else if(statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
markerSeverity = IMarker.SEVERITY_ERROR;
}
marker.setAttribute(IMarker.SEVERITY, markerSeverity);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java
index c23e590fff8..b23bb35a62c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -46,10 +46,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActivityName_5112Parser() {
- if (activityName_5112Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(activityName_5112Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -68,10 +66,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActivityName_6079Parser() {
- if (activityName_6079Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(activityName_6079Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
activityName_6079Parser = parser;
}
@@ -87,10 +83,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionName_5113Parser() {
- if (interactionName_5113Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionName_5113Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -109,10 +103,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionName_6080Parser() {
- if (interactionName_6080Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionName_6080Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interactionName_6080Parser = parser;
}
@@ -128,10 +120,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getProtocolStateMachineName_5114Parser() {
- if (protocolStateMachineName_5114Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(protocolStateMachineName_5114Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -150,10 +140,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getProtocolStateMachineName_6081Parser() {
- if (protocolStateMachineName_6081Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(protocolStateMachineName_6081Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
protocolStateMachineName_6081Parser = parser;
}
@@ -169,10 +157,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStateMachineName_5115Parser() {
- if (stateMachineName_5115Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stateMachineName_5115Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -191,10 +177,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStateMachineName_6082Parser() {
- if (stateMachineName_6082Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stateMachineName_6082Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stateMachineName_6082Parser = parser;
}
@@ -210,10 +194,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getFunctionBehaviorName_5116Parser() {
- if (functionBehaviorName_5116Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(functionBehaviorName_5116Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -232,10 +214,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getFunctionBehaviorName_6083Parser() {
- if (functionBehaviorName_6083Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(functionBehaviorName_6083Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
functionBehaviorName_6083Parser = parser;
}
@@ -251,10 +231,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueBehaviorName_5117Parser() {
- if (opaqueBehaviorName_5117Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueBehaviorName_5117Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -273,10 +251,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueBehaviorName_6084Parser() {
- if (opaqueBehaviorName_6084Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueBehaviorName_6084Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
opaqueBehaviorName_6084Parser = parser;
}
@@ -292,10 +268,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentName_5121Parser() {
- if (componentName_5121Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(componentName_5121Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -314,10 +288,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentName_6085Parser() {
- if (componentName_6085Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(componentName_6085Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
componentName_6085Parser = parser;
}
@@ -333,10 +305,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeviceName_5122Parser() {
- if (deviceName_5122Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deviceName_5122Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -355,10 +325,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeviceName_6086Parser() {
- if (deviceName_6086Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deviceName_6086Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
deviceName_6086Parser = parser;
}
@@ -374,10 +342,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExecutionEnvironmentName_5123Parser() {
- if (executionEnvironmentName_5123Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(executionEnvironmentName_5123Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -396,10 +362,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExecutionEnvironmentName_6087Parser() {
- if (executionEnvironmentName_6087Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(executionEnvironmentName_6087Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
executionEnvironmentName_6087Parser = parser;
}
@@ -415,10 +379,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getNodeName_5124Parser() {
- if (nodeName_5124Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(nodeName_5124Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -437,10 +399,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getNodeName_6088Parser() {
- if (nodeName_6088Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(nodeName_6088Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
nodeName_6088Parser = parser;
}
@@ -456,10 +416,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getClassName_5156Parser() {
- if (className_5156Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(className_5156Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -478,10 +436,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getClassName_6089Parser() {
- if (className_6089Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(className_6089Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
className_6089Parser = parser;
}
@@ -497,10 +453,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationName_5158Parser() {
- if (collaborationName_5158Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationName_5158Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -519,10 +473,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationName_6090Parser() {
- if (collaborationName_6090Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationName_6090Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
collaborationName_6090Parser = parser;
}
@@ -538,10 +490,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceName_5159Parser() {
- if (interfaceName_5159Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interfaceName_5159Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -560,10 +510,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceName_6091Parser() {
- if (interfaceName_6091Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interfaceName_6091Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interfaceName_6091Parser = parser;
}
@@ -579,10 +527,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPrimitiveTypeName_5118Parser() {
- if (primitiveTypeName_5118Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(primitiveTypeName_5118Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -601,10 +547,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPrimitiveTypeName_6092Parser() {
- if (primitiveTypeName_6092Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(primitiveTypeName_6092Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
primitiveTypeName_6092Parser = parser;
}
@@ -620,10 +564,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getEnumerationName_5119Parser() {
- if (enumerationName_5119Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(enumerationName_5119Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -642,10 +584,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getEnumerationName_6093Parser() {
- if (enumerationName_6093Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(enumerationName_6093Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
enumerationName_6093Parser = parser;
}
@@ -661,10 +601,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDataTypeName_5120Parser() {
- if (dataTypeName_5120Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(dataTypeName_5120Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -683,10 +621,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDataTypeName_6094Parser() {
- if (dataTypeName_6094Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(dataTypeName_6094Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
dataTypeName_6094Parser = parser;
}
@@ -702,10 +638,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActorName_5160Parser() {
- if (actorName_5160Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(actorName_5160Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -724,10 +658,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActorName_6095Parser() {
- if (actorName_6095Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(actorName_6095Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
actorName_6095Parser = parser;
}
@@ -743,10 +675,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentSpecificationName_5161Parser() {
- if (deploymentSpecificationName_5161Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deploymentSpecificationName_5161Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -765,10 +695,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentSpecificationName_6096Parser() {
- if (deploymentSpecificationName_6096Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deploymentSpecificationName_6096Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
deploymentSpecificationName_6096Parser = parser;
}
@@ -784,10 +712,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getArtifactName_5162Parser() {
- if (artifactName_5162Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(artifactName_5162Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -806,10 +732,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getArtifactName_6097Parser() {
- if (artifactName_6097Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(artifactName_6097Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
artifactName_6097Parser = parser;
}
@@ -825,10 +749,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInformationItemName_5163Parser() {
- if (informationItemName_5163Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(informationItemName_5163Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -847,10 +769,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInformationItemName_6098Parser() {
- if (informationItemName_6098Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(informationItemName_6098Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
informationItemName_6098Parser = parser;
}
@@ -866,10 +786,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalName_5164Parser() {
- if (signalName_5164Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalName_5164Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -888,10 +806,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalName_6099Parser() {
- if (signalName_6099Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalName_6099Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
signalName_6099Parser = parser;
}
@@ -907,10 +823,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUseCaseName_5165Parser() {
- if (useCaseName_5165Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(useCaseName_5165Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -929,10 +843,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUseCaseName_6100Parser() {
- if (useCaseName_6100Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(useCaseName_6100Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
useCaseName_6100Parser = parser;
}
@@ -948,10 +860,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalEventName_5166Parser() {
- if (signalEventName_5166Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalEventName_5166Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -970,10 +880,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalEventName_6101Parser() {
- if (signalEventName_6101Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalEventName_6101Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
signalEventName_6101Parser = parser;
}
@@ -989,10 +897,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCallEventName_5167Parser() {
- if (callEventName_5167Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(callEventName_5167Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1011,10 +917,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCallEventName_6102Parser() {
- if (callEventName_6102Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(callEventName_6102Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
callEventName_6102Parser = parser;
}
@@ -1030,10 +934,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getAnyReceiveEventName_5168Parser() {
- if (anyReceiveEventName_5168Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(anyReceiveEventName_5168Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1052,10 +954,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getAnyReceiveEventName_6103Parser() {
- if (anyReceiveEventName_6103Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(anyReceiveEventName_6103Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
anyReceiveEventName_6103Parser = parser;
}
@@ -1071,10 +971,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getChangeEventName_5171Parser() {
- if (changeEventName_5171Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(changeEventName_5171Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1093,10 +991,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getChangeEventName_6104Parser() {
- if (changeEventName_6104Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(changeEventName_6104Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
changeEventName_6104Parser = parser;
}
@@ -1112,10 +1008,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeEventName_5172Parser() {
- if (timeEventName_5172Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeEventName_5172Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1134,10 +1028,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeEventName_6105Parser() {
- if (timeEventName_6105Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeEventName_6105Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeEventName_6105Parser = parser;
}
@@ -1153,10 +1045,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationObservationName_5151Parser() {
- if (durationObservationName_5151Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationObservationName_5151Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
durationObservationName_5151Parser = parser;
}
@@ -1172,7 +1062,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationObservationName_5152Parser() {
- if (durationObservationName_5152Parser == null) {
+ if(durationObservationName_5152Parser == null) {
durationObservationName_5152Parser = new AppliedStereotypeParser();
}
return durationObservationName_5152Parser;
@@ -1187,10 +1077,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeObservationName_5142Parser() {
- if (timeObservationName_5142Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeObservationName_5142Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeObservationName_5142Parser = parser;
}
@@ -1206,7 +1094,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeObservationName_5143Parser() {
- if (timeObservationName_5143Parser == null) {
+ if(timeObservationName_5143Parser == null) {
timeObservationName_5143Parser = new AppliedStereotypeParser();
}
return timeObservationName_5143Parser;
@@ -1221,10 +1109,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralBooleanName_5178Parser() {
- if (literalBooleanName_5178Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalBooleanName_5178Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1243,10 +1129,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralBooleanName_6106Parser() {
- if (literalBooleanName_6106Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalBooleanName_6106Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
literalBooleanName_6106Parser = parser;
}
@@ -1262,10 +1146,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralIntegerName_5179Parser() {
- if (literalIntegerName_5179Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalIntegerName_5179Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1284,10 +1166,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralIntegerName_6107Parser() {
- if (literalIntegerName_6107Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalIntegerName_6107Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
literalIntegerName_6107Parser = parser;
}
@@ -1303,10 +1183,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralNullName_5180Parser() {
- if (literalNullName_5180Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalNullName_5180Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1325,10 +1203,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralNullName_6108Parser() {
- if (literalNullName_6108Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalNullName_6108Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
literalNullName_6108Parser = parser;
}
@@ -1344,10 +1220,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralStringName_5181Parser() {
- if (literalStringName_5181Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalStringName_5181Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1366,10 +1240,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralStringName_6109Parser() {
- if (literalStringName_6109Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalStringName_6109Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
literalStringName_6109Parser = parser;
}
@@ -1385,10 +1257,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralUnlimitedNaturalName_5182Parser() {
- if (literalUnlimitedNaturalName_5182Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalUnlimitedNaturalName_5182Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1407,10 +1277,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getLiteralUnlimitedNaturalName_6110Parser() {
- if (literalUnlimitedNaturalName_6110Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(literalUnlimitedNaturalName_6110Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
literalUnlimitedNaturalName_6110Parser = parser;
}
@@ -1426,10 +1294,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStringExpressionName_5183Parser() {
- if (stringExpressionName_5183Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stringExpressionName_5183Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1448,10 +1314,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStringExpressionName_6111Parser() {
- if (stringExpressionName_6111Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stringExpressionName_6111Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stringExpressionName_6111Parser = parser;
}
@@ -1467,10 +1331,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueExpressionName_5184Parser() {
- if (opaqueExpressionName_5184Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueExpressionName_5184Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1489,10 +1351,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueExpressionName_6112Parser() {
- if (opaqueExpressionName_6112Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueExpressionName_6112Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
opaqueExpressionName_6112Parser = parser;
}
@@ -1508,10 +1368,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeExpressionName_5185Parser() {
- if (timeExpressionName_5185Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeExpressionName_5185Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1530,10 +1388,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeExpressionName_6113Parser() {
- if (timeExpressionName_6113Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeExpressionName_6113Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeExpressionName_6113Parser = parser;
}
@@ -1549,10 +1405,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExpressionName_5186Parser() {
- if (expressionName_5186Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(expressionName_5186Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1571,10 +1425,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExpressionName_6114Parser() {
- if (expressionName_6114Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(expressionName_6114Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
expressionName_6114Parser = parser;
}
@@ -1590,10 +1442,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationName_5187Parser() {
- if (durationName_5187Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationName_5187Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1612,10 +1462,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationName_6115Parser() {
- if (durationName_6115Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationName_6115Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
durationName_6115Parser = parser;
}
@@ -1631,10 +1479,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeIntervalName_5188Parser() {
- if (timeIntervalName_5188Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeIntervalName_5188Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1653,10 +1499,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeIntervalName_6116Parser() {
- if (timeIntervalName_6116Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeIntervalName_6116Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeIntervalName_6116Parser = parser;
}
@@ -1672,10 +1516,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationIntervalName_5189Parser() {
- if (durationIntervalName_5189Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationIntervalName_5189Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1694,10 +1536,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationIntervalName_6117Parser() {
- if (durationIntervalName_6117Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationIntervalName_6117Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
durationIntervalName_6117Parser = parser;
}
@@ -1713,10 +1553,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalName_5190Parser() {
- if (intervalName_5190Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(intervalName_5190Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1735,10 +1573,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalName_6118Parser() {
- if (intervalName_6118Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(intervalName_6118Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
intervalName_6118Parser = parser;
}
@@ -1754,10 +1590,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInstanceValueName_5191Parser() {
- if (instanceValueName_5191Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(instanceValueName_5191Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -1776,10 +1610,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInstanceValueName_6119Parser() {
- if (instanceValueName_6119Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(instanceValueName_6119Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
instanceValueName_6119Parser = parser;
}
@@ -1795,7 +1627,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCommentBody_5192Parser() {
- if (commentBody_5192Parser == null) {
+ if(commentBody_5192Parser == null) {
commentBody_5192Parser = new CommentParser();
}
return commentBody_5192Parser;
@@ -1810,10 +1642,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationConstraintName_5193Parser() {
- if (durationConstraintName_5193Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationConstraintName_5193Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
durationConstraintName_5193Parser = parser;
}
@@ -1829,7 +1659,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationConstraintSpecification_6035Parser() {
- if (durationConstraintSpecification_6035Parser == null) {
+ if(durationConstraintSpecification_6035Parser == null) {
durationConstraintSpecification_6035Parser = new ConstraintParser();
}
return durationConstraintSpecification_6035Parser;
@@ -1844,10 +1674,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeConstraintName_5194Parser() {
- if (timeConstraintName_5194Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeConstraintName_5194Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeConstraintName_5194Parser = parser;
}
@@ -1863,7 +1691,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeConstraintSpecification_6036Parser() {
- if (timeConstraintSpecification_6036Parser == null) {
+ if(timeConstraintSpecification_6036Parser == null) {
timeConstraintSpecification_6036Parser = new ConstraintParser();
}
return timeConstraintSpecification_6036Parser;
@@ -1878,10 +1706,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalConstraintName_5195Parser() {
- if (intervalConstraintName_5195Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(intervalConstraintName_5195Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
intervalConstraintName_5195Parser = parser;
}
@@ -1897,7 +1723,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalConstraintSpecification_6037Parser() {
- if (intervalConstraintSpecification_6037Parser == null) {
+ if(intervalConstraintSpecification_6037Parser == null) {
intervalConstraintSpecification_6037Parser = new ConstraintParser();
}
return intervalConstraintSpecification_6037Parser;
@@ -1912,10 +1738,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionConstraintName_5196Parser() {
- if (interactionConstraintName_5196Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionConstraintName_5196Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interactionConstraintName_5196Parser = parser;
}
@@ -1931,7 +1755,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionConstraintSpecification_6038Parser() {
- if (interactionConstraintSpecification_6038Parser == null) {
+ if(interactionConstraintSpecification_6038Parser == null) {
interactionConstraintSpecification_6038Parser = new ConstraintParser();
}
return interactionConstraintSpecification_6038Parser;
@@ -1946,10 +1770,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConstraintName_5197Parser() {
- if (constraintName_5197Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(constraintName_5197Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
constraintName_5197Parser = parser;
}
@@ -1965,7 +1787,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConstraintSpecification_6039Parser() {
- if (constraintSpecification_6039Parser == null) {
+ if(constraintSpecification_6039Parser == null) {
constraintSpecification_6039Parser = new ConstraintParser();
}
return constraintSpecification_6039Parser;
@@ -1980,10 +1802,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getNodeName_6053Parser() {
- if (nodeName_6053Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(nodeName_6053Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
nodeName_6053Parser = parser;
}
@@ -1999,10 +1819,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPortName_5125Parser() {
- if (portName_5125Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(portName_5125Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
portName_5125Parser = parser;
}
@@ -2018,7 +1836,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPortName_6029Parser() {
- if (portName_6029Parser == null) {
+ if(portName_6029Parser == null) {
portName_6029Parser = new AppliedStereotypeParser();
}
return portName_6029Parser;
@@ -2033,10 +1851,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getParameterName_6033Parser() {
- if (parameterName_6033Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(parameterName_6033Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parameterName_6033Parser = parser;
}
@@ -2052,7 +1868,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getParameterName_6034Parser() {
- if (parameterName_6034Parser == null) {
+ if(parameterName_6034Parser == null) {
parameterName_6034Parser = new AppliedStereotypeParser();
}
return parameterName_6034Parser;
@@ -2067,10 +1883,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPropertyName_5126Parser() {
- if (propertyName_5126Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(propertyName_5126Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
propertyName_5126Parser = parser;
}
@@ -2086,10 +1900,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPropertyName_6054Parser() {
- if (propertyName_6054Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(propertyName_6054Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
propertyName_6054Parser = parser;
}
@@ -2105,10 +1917,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectableElementName_5198Parser() {
- if (connectableElementName_5198Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(connectableElementName_5198Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0}"); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2127,10 +1937,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectableElementName_6055Parser() {
- if (connectableElementName_6055Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(connectableElementName_6055Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
connectableElementName_6055Parser = parser;
}
@@ -2146,10 +1954,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationUseName_5127Parser() {
- if (collaborationUseName_5127Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationUseName_5127Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
collaborationUseName_5127Parser = parser;
}
@@ -2165,10 +1971,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationUseName_6056Parser() {
- if (collaborationUseName_6056Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationUseName_6056Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
collaborationUseName_6056Parser = parser;
}
@@ -2184,10 +1988,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActivityName_5128Parser() {
- if (activityName_5128Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(activityName_5128Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2206,10 +2008,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActivityName_6057Parser() {
- if (activityName_6057Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(activityName_6057Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
activityName_6057Parser = parser;
}
@@ -2225,10 +2025,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionName_5129Parser() {
- if (interactionName_5129Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionName_5129Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2247,10 +2045,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionName_6058Parser() {
- if (interactionName_6058Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionName_6058Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interactionName_6058Parser = parser;
}
@@ -2266,10 +2062,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getProtocolStateMachineName_5130Parser() {
- if (protocolStateMachineName_5130Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(protocolStateMachineName_5130Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2288,10 +2082,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getProtocolStateMachineName_6059Parser() {
- if (protocolStateMachineName_6059Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(protocolStateMachineName_6059Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
protocolStateMachineName_6059Parser = parser;
}
@@ -2307,10 +2099,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStateMachineName_5131Parser() {
- if (stateMachineName_5131Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stateMachineName_5131Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2329,10 +2119,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getStateMachineName_6060Parser() {
- if (stateMachineName_6060Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(stateMachineName_6060Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stateMachineName_6060Parser = parser;
}
@@ -2348,10 +2136,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getFunctionBehaviorName_5132Parser() {
- if (functionBehaviorName_5132Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(functionBehaviorName_5132Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2370,10 +2156,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getFunctionBehaviorName_6061Parser() {
- if (functionBehaviorName_6061Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(functionBehaviorName_6061Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
functionBehaviorName_6061Parser = parser;
}
@@ -2389,10 +2173,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueBehaviorName_5133Parser() {
- if (opaqueBehaviorName_5133Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueBehaviorName_5133Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2411,10 +2193,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOpaqueBehaviorName_6062Parser() {
- if (opaqueBehaviorName_6062Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(opaqueBehaviorName_6062Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
opaqueBehaviorName_6062Parser = parser;
}
@@ -2430,10 +2210,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentName_5137Parser() {
- if (componentName_5137Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(componentName_5137Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2452,10 +2230,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentName_6063Parser() {
- if (componentName_6063Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(componentName_6063Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
componentName_6063Parser = parser;
}
@@ -2471,10 +2247,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeviceName_5138Parser() {
- if (deviceName_5138Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deviceName_5138Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2493,10 +2267,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeviceName_6064Parser() {
- if (deviceName_6064Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deviceName_6064Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
deviceName_6064Parser = parser;
}
@@ -2512,10 +2284,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExecutionEnvironmentName_5139Parser() {
- if (executionEnvironmentName_5139Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(executionEnvironmentName_5139Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2534,10 +2304,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getExecutionEnvironmentName_6065Parser() {
- if (executionEnvironmentName_6065Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(executionEnvironmentName_6065Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
executionEnvironmentName_6065Parser = parser;
}
@@ -2553,10 +2321,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getNodeName_5140Parser() {
- if (nodeName_5140Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(nodeName_5140Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2575,10 +2341,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getNodeName_6066Parser() {
- if (nodeName_6066Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(nodeName_6066Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
nodeName_6066Parser = parser;
}
@@ -2594,10 +2358,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getClassName_5155Parser() {
- if (className_5155Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(className_5155Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2616,10 +2378,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getClassName_6067Parser() {
- if (className_6067Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(className_6067Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
className_6067Parser = parser;
}
@@ -2635,10 +2395,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationName_5141Parser() {
- if (collaborationName_5141Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationName_5141Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2657,10 +2415,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCollaborationName_6068Parser() {
- if (collaborationName_6068Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(collaborationName_6068Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
collaborationName_6068Parser = parser;
}
@@ -2676,10 +2432,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceName_5154Parser() {
- if (interfaceName_5154Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interfaceName_5154Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2698,10 +2452,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceName_6069Parser() {
- if (interfaceName_6069Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interfaceName_6069Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interfaceName_6069Parser = parser;
}
@@ -2717,10 +2469,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPrimitiveTypeName_5134Parser() {
- if (primitiveTypeName_5134Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(primitiveTypeName_5134Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2739,10 +2489,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getPrimitiveTypeName_6070Parser() {
- if (primitiveTypeName_6070Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(primitiveTypeName_6070Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
primitiveTypeName_6070Parser = parser;
}
@@ -2758,10 +2506,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getEnumerationName_5135Parser() {
- if (enumerationName_5135Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(enumerationName_5135Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2780,10 +2526,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getEnumerationName_6071Parser() {
- if (enumerationName_6071Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(enumerationName_6071Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
enumerationName_6071Parser = parser;
}
@@ -2799,10 +2543,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDataTypeName_5136Parser() {
- if (dataTypeName_5136Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(dataTypeName_5136Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2821,10 +2563,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDataTypeName_6072Parser() {
- if (dataTypeName_6072Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(dataTypeName_6072Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
dataTypeName_6072Parser = parser;
}
@@ -2840,10 +2580,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActorName_5144Parser() {
- if (actorName_5144Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(actorName_5144Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2862,10 +2600,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getActorName_6073Parser() {
- if (actorName_6073Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(actorName_6073Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
actorName_6073Parser = parser;
}
@@ -2881,10 +2617,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentSpecificationName_5145Parser() {
- if (deploymentSpecificationName_5145Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deploymentSpecificationName_5145Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2903,10 +2637,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentSpecificationName_6074Parser() {
- if (deploymentSpecificationName_6074Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deploymentSpecificationName_6074Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
deploymentSpecificationName_6074Parser = parser;
}
@@ -2922,10 +2654,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getArtifactName_5146Parser() {
- if (artifactName_5146Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(artifactName_5146Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2944,10 +2674,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getArtifactName_6075Parser() {
- if (artifactName_6075Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(artifactName_6075Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
artifactName_6075Parser = parser;
}
@@ -2963,10 +2691,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInformationItemName_5147Parser() {
- if (informationItemName_5147Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(informationItemName_5147Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -2985,10 +2711,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInformationItemName_6076Parser() {
- if (informationItemName_6076Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(informationItemName_6076Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
informationItemName_6076Parser = parser;
}
@@ -3004,10 +2728,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalName_5148Parser() {
- if (signalName_5148Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalName_5148Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -3026,10 +2748,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSignalName_6077Parser() {
- if (signalName_6077Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(signalName_6077Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
signalName_6077Parser = parser;
}
@@ -3045,10 +2765,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUseCaseName_5149Parser() {
- if (useCaseName_5149Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(useCaseName_5149Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -3067,10 +2785,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUseCaseName_6078Parser() {
- if (useCaseName_6078Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(useCaseName_6078Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
useCaseName_6078Parser = parser;
}
@@ -3086,7 +2802,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getCommentBody_5150Parser() {
- if (commentBody_5150Parser == null) {
+ if(commentBody_5150Parser == null) {
commentBody_5150Parser = new CommentParser();
}
return commentBody_5150Parser;
@@ -3101,10 +2817,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationConstraintName_6040Parser() {
- if (durationConstraintName_6040Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(durationConstraintName_6040Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
durationConstraintName_6040Parser = parser;
}
@@ -3120,7 +2834,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDurationConstraintSpecification_6041Parser() {
- if (durationConstraintSpecification_6041Parser == null) {
+ if(durationConstraintSpecification_6041Parser == null) {
durationConstraintSpecification_6041Parser = new ConstraintParser();
}
return durationConstraintSpecification_6041Parser;
@@ -3135,10 +2849,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeConstraintName_6042Parser() {
- if (timeConstraintName_6042Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(timeConstraintName_6042Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
timeConstraintName_6042Parser = parser;
}
@@ -3154,7 +2866,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getTimeConstraintSpecification_6043Parser() {
- if (timeConstraintSpecification_6043Parser == null) {
+ if(timeConstraintSpecification_6043Parser == null) {
timeConstraintSpecification_6043Parser = new ConstraintParser();
}
return timeConstraintSpecification_6043Parser;
@@ -3169,10 +2881,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalConstraintName_6044Parser() {
- if (intervalConstraintName_6044Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(intervalConstraintName_6044Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
intervalConstraintName_6044Parser = parser;
}
@@ -3188,7 +2898,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getIntervalConstraintSpecification_6045Parser() {
- if (intervalConstraintSpecification_6045Parser == null) {
+ if(intervalConstraintSpecification_6045Parser == null) {
intervalConstraintSpecification_6045Parser = new ConstraintParser();
}
return intervalConstraintSpecification_6045Parser;
@@ -3203,10 +2913,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionConstraintName_6046Parser() {
- if (interactionConstraintName_6046Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interactionConstraintName_6046Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interactionConstraintName_6046Parser = parser;
}
@@ -3222,7 +2930,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInteractionConstraintSpecification_6047Parser() {
- if (interactionConstraintSpecification_6047Parser == null) {
+ if(interactionConstraintSpecification_6047Parser == null) {
interactionConstraintSpecification_6047Parser = new ConstraintParser();
}
return interactionConstraintSpecification_6047Parser;
@@ -3237,10 +2945,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConstraintName_6048Parser() {
- if (constraintName_6048Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(constraintName_6048Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
constraintName_6048Parser = parser;
}
@@ -3256,7 +2962,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConstraintSpecification_6049Parser() {
- if (constraintSpecification_6049Parser == null) {
+ if(constraintSpecification_6049Parser == null) {
constraintSpecification_6049Parser = new ConstraintParser();
}
return constraintSpecification_6049Parser;
@@ -3271,10 +2977,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getProperty_3101Parser() {
- if (property_3101Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(property_3101Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -3293,10 +2997,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getOperation_3102Parser() {
- if (operation_3102Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(operation_3102Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -3315,10 +3017,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getEnumerationLiteral_3066Parser() {
- if (enumerationLiteral_3066Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(enumerationLiteral_3066Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0} "); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -3337,10 +3037,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentRealizationName_6001Parser() {
- if (componentRealizationName_6001Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(componentRealizationName_6001Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
componentRealizationName_6001Parser = parser;
}
@@ -3356,7 +3054,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getComponentRealizationName_6015Parser() {
- if (componentRealizationName_6015Parser == null) {
+ if(componentRealizationName_6015Parser == null) {
componentRealizationName_6015Parser = new AppliedStereotypeParser();
}
return componentRealizationName_6015Parser;
@@ -3371,10 +3069,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceRealizationName_6002Parser() {
- if (interfaceRealizationName_6002Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(interfaceRealizationName_6002Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
interfaceRealizationName_6002Parser = parser;
}
@@ -3390,7 +3086,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInterfaceRealizationName_6016Parser() {
- if (interfaceRealizationName_6016Parser == null) {
+ if(interfaceRealizationName_6016Parser == null) {
interfaceRealizationName_6016Parser = new AppliedStereotypeParser();
}
return interfaceRealizationName_6016Parser;
@@ -3405,10 +3101,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSubstitutionName_6003Parser() {
- if (substitutionName_6003Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(substitutionName_6003Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
substitutionName_6003Parser = parser;
}
@@ -3424,7 +3118,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getSubstitutionName_6017Parser() {
- if (substitutionName_6017Parser == null) {
+ if(substitutionName_6017Parser == null) {
substitutionName_6017Parser = new AppliedStereotypeParser();
}
return substitutionName_6017Parser;
@@ -3439,10 +3133,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getRealizationName_6004Parser() {
- if (realizationName_6004Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(realizationName_6004Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
realizationName_6004Parser = parser;
}
@@ -3458,7 +3150,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getRealizationName_6018Parser() {
- if (realizationName_6018Parser == null) {
+ if(realizationName_6018Parser == null) {
realizationName_6018Parser = new AppliedStereotypeParser();
}
return realizationName_6018Parser;
@@ -3473,10 +3165,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getManifestationName_6005Parser() {
- if (manifestationName_6005Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(manifestationName_6005Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
manifestationName_6005Parser = parser;
}
@@ -3492,7 +3182,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getManifestationName_6019Parser() {
- if (manifestationName_6019Parser == null) {
+ if(manifestationName_6019Parser == null) {
manifestationName_6019Parser = new AppliedStereotypeParser();
}
return manifestationName_6019Parser;
@@ -3507,10 +3197,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getAbstractionName_6006Parser() {
- if (abstractionName_6006Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(abstractionName_6006Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
abstractionName_6006Parser = parser;
}
@@ -3526,7 +3214,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getAbstractionName_6020Parser() {
- if (abstractionName_6020Parser == null) {
+ if(abstractionName_6020Parser == null) {
abstractionName_6020Parser = new AppliedStereotypeParser();
}
return abstractionName_6020Parser;
@@ -3541,10 +3229,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUsageName_6007Parser() {
- if (usageName_6007Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(usageName_6007Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
usageName_6007Parser = parser;
}
@@ -3560,7 +3246,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getUsageName_6021Parser() {
- if (usageName_6021Parser == null) {
+ if(usageName_6021Parser == null) {
usageName_6021Parser = new AppliedStereotypeParser();
}
return usageName_6021Parser;
@@ -3575,10 +3261,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentName_6008Parser() {
- if (deploymentName_6008Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(deploymentName_6008Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
deploymentName_6008Parser = parser;
}
@@ -3594,7 +3278,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDeploymentName_6022Parser() {
- if (deploymentName_6022Parser == null) {
+ if(deploymentName_6022Parser == null) {
deploymentName_6022Parser = new AppliedStereotypeParser();
}
return deploymentName_6022Parser;
@@ -3609,7 +3293,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDependencyName_6027Parser() {
- if (dependencyName_6027Parser == null) {
+ if(dependencyName_6027Parser == null) {
dependencyName_6027Parser = new RoleBindingRoleNameParser();
}
return dependencyName_6027Parser;
@@ -3624,7 +3308,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDependencyName_6028Parser() {
- if (dependencyName_6028Parser == null) {
+ if(dependencyName_6028Parser == null) {
dependencyName_6028Parser = new AppliedStereotypeParser();
}
return dependencyName_6028Parser;
@@ -3639,10 +3323,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDependencyName_6009Parser() {
- if (dependencyName_6009Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(dependencyName_6009Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
dependencyName_6009Parser = parser;
}
@@ -3658,7 +3340,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getDependencyName_6023Parser() {
- if (dependencyName_6023Parser == null) {
+ if(dependencyName_6023Parser == null) {
dependencyName_6023Parser = new AppliedStereotypeParser();
}
return dependencyName_6023Parser;
@@ -3673,7 +3355,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectorName_6025Parser() {
- if (connectorName_6025Parser == null) {
+ if(connectorName_6025Parser == null) {
connectorName_6025Parser = new AppliedStereotypeParser();
}
return connectorName_6025Parser;
@@ -3688,10 +3370,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectorName_6050Parser() {
- if (connectorName_6050Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(connectorName_6050Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
connectorName_6050Parser = parser;
}
@@ -3707,10 +3387,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectorName_6051Parser() {
- if (connectorName_6051Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(connectorName_6051Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("sourceMul{0}"); //$NON-NLS-1$
parser.setEditorPattern("sourceMul{0}"); //$NON-NLS-1$
@@ -3729,10 +3407,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getConnectorName_6052Parser() {
- if (connectorName_6052Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ if(connectorName_6052Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("targetMul{0}"); //$NON-NLS-1$
parser.setEditorPattern("targetMul{0}"); //$NON-NLS-1$
@@ -3751,7 +3427,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getGeneralizationIsSubstitutable_6024Parser() {
- if (generalizationIsSubstitutable_6024Parser == null) {
+ if(generalizationIsSubstitutable_6024Parser == null) {
generalizationIsSubstitutable_6024Parser = new AppliedStereotypeParser();
}
return generalizationIsSubstitutable_6024Parser;
@@ -3766,7 +3442,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
private IParser getInformationFlowName_6032Parser() {
- if (informationFlowName_6032Parser == null) {
+ if(informationFlowName_6032Parser == null) {
informationFlowName_6032Parser = new AppliedStereotypeParser();
}
return informationFlowName_6032Parser;
@@ -3776,476 +3452,379 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
* @generated
*/
protected IParser getParser(int visualID) {
- switch (visualID) {
+ switch(visualID) {
case ActivityCompositeNameEditPart.VISUAL_ID:
return getActivityName_5112Parser();
case ActivityCompositeFloatingLabelEditPart.VISUAL_ID:
return getActivityName_6079Parser();
-
case InteractionCompositeNameEditPart.VISUAL_ID:
return getInteractionName_5113Parser();
case InteractionCompositeFloatingLabelEditPart.VISUAL_ID:
return getInteractionName_6080Parser();
-
case ProtocolStateMachineCompositeNameEditPart.VISUAL_ID:
return getProtocolStateMachineName_5114Parser();
case ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return getProtocolStateMachineName_6081Parser();
-
case StateMachineCompositeNameEditPart.VISUAL_ID:
return getStateMachineName_5115Parser();
case StateMachineCompositeFloatingLabelEditPart.VISUAL_ID:
return getStateMachineName_6082Parser();
-
case FunctionBehaviorCompositeNameEditPart.VISUAL_ID:
return getFunctionBehaviorName_5116Parser();
case FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return getFunctionBehaviorName_6083Parser();
-
case OpaqueBehaviorCompositeNameEditPart.VISUAL_ID:
return getOpaqueBehaviorName_5117Parser();
case OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID:
return getOpaqueBehaviorName_6084Parser();
-
case ComponentCompositeNameEditPart.VISUAL_ID:
return getComponentName_5121Parser();
case ComponentCompositeFloatingLabelEditPart.VISUAL_ID:
return getComponentName_6085Parser();
-
case DeviceCompositeNameEditPart.VISUAL_ID:
return getDeviceName_5122Parser();
case DeviceCompositeFloatingLabelEditPart.VISUAL_ID:
return getDeviceName_6086Parser();
-
case ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID:
return getExecutionEnvironmentName_5123Parser();
case ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID:
return getExecutionEnvironmentName_6087Parser();
-
case NodeCompositeNameEditPart.VISUAL_ID:
return getNodeName_5124Parser();
case NodeCompositeFloatingLabelEditPart.VISUAL_ID:
return getNodeName_6088Parser();
-
case ClassCompositeNameEditPart.VISUAL_ID:
return getClassName_5156Parser();
case ClassCompositeFloatingLabelEditPart.VISUAL_ID:
return getClassName_6089Parser();
-
case CollaborationCompositeNameEditPart.VISUAL_ID:
return getCollaborationName_5158Parser();
case CollaborationCompositeFloatingLabelEditPart.VISUAL_ID:
return getCollaborationName_6090Parser();
-
case InterfaceNameEditPart.VISUAL_ID:
return getInterfaceName_5159Parser();
case InterfaceFloatingLabelEditPart.VISUAL_ID:
return getInterfaceName_6091Parser();
-
case PrimitiveTypeNameEditPart.VISUAL_ID:
return getPrimitiveTypeName_5118Parser();
case PrimitiveTypeFloatingLabelEditPart.VISUAL_ID:
return getPrimitiveTypeName_6092Parser();
-
case EnumerationNameEditPart.VISUAL_ID:
return getEnumerationName_5119Parser();
case EnumerationFloatingLabelEditPart.VISUAL_ID:
return getEnumerationName_6093Parser();
-
case DataTypeNameEditPart.VISUAL_ID:
return getDataTypeName_5120Parser();
case DataTypeFloatingLabelEditPart.VISUAL_ID:
return getDataTypeName_6094Parser();
-
case ActorNameEditPart.VISUAL_ID:
return getActorName_5160Parser();
case ActorFloatingLabelEditPart.VISUAL_ID:
return getActorName_6095Parser();
-
case DeploymentSpecificationNameEditPart.VISUAL_ID:
return getDeploymentSpecificationName_5161Parser();
case DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID:
return getDeploymentSpecificationName_6096Parser();
-
case ArtifactNameEditPart.VISUAL_ID:
return getArtifactName_5162Parser();
case ArtifactFloatingLabelEditPart.VISUAL_ID:
return getArtifactName_6097Parser();
-
case InformationItemNameEditPart.VISUAL_ID:
return getInformationItemName_5163Parser();
case InformationItemFloatingLabelEditPart.VISUAL_ID:
return getInformationItemName_6098Parser();
-
case SignalNameEditPart.VISUAL_ID:
return getSignalName_5164Parser();
case SignalFloatingLabelEditPart.VISUAL_ID:
return getSignalName_6099Parser();
-
case UseCaseNameEditPart.VISUAL_ID:
return getUseCaseName_5165Parser();
case UseCaseFloatingLabelEditPart.VISUAL_ID:
return getUseCaseName_6100Parser();
-
case SignalEventNameEditPart.VISUAL_ID:
return getSignalEventName_5166Parser();
case SignalEventFloatingLabelEditPart.VISUAL_ID:
return getSignalEventName_6101Parser();
-
case CallEventNameEditPart.VISUAL_ID:
return getCallEventName_5167Parser();
case CallEventFloatingLabelEditPart.VISUAL_ID:
return getCallEventName_6102Parser();
-
case AnyReceiveEventNameEditPart.VISUAL_ID:
return getAnyReceiveEventName_5168Parser();
case AnyReceiveEventFloatingLabelEditPart.VISUAL_ID:
return getAnyReceiveEventName_6103Parser();
-
case ChangeEventNameEditPart.VISUAL_ID:
return getChangeEventName_5171Parser();
case ChangeEventFloatingLabelEditPart.VISUAL_ID:
return getChangeEventName_6104Parser();
-
case TimeEventNameEditPart.VISUAL_ID:
return getTimeEventName_5172Parser();
case TimeEventFloatingLabelEditPart.VISUAL_ID:
return getTimeEventName_6105Parser();
-
case DurationObservationNameEditPart.VISUAL_ID:
return getDurationObservationName_5151Parser();
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return getDurationObservationName_5152Parser();
-
case TimeObservationNameEditPart.VISUAL_ID:
return getTimeObservationName_5142Parser();
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return getTimeObservationName_5143Parser();
-
case LiteralBooleanNameEditPart.VISUAL_ID:
return getLiteralBooleanName_5178Parser();
case LiteralBooleanFloatingLabelEditPart.VISUAL_ID:
return getLiteralBooleanName_6106Parser();
-
case LiteralIntegerNameEditPart.VISUAL_ID:
return getLiteralIntegerName_5179Parser();
case LiteralIntegerFloatingLabelEditPart.VISUAL_ID:
return getLiteralIntegerName_6107Parser();
-
case LiteralNullNameEditPart.VISUAL_ID:
return getLiteralNullName_5180Parser();
case LiteralNullFloatingLabelEditPart.VISUAL_ID:
return getLiteralNullName_6108Parser();
-
case LiteralStringNameEditPart.VISUAL_ID:
return getLiteralStringName_5181Parser();
case LiteralStringFloatingLabelEditPart.VISUAL_ID:
return getLiteralStringName_6109Parser();
-
case LiteralUnlimitedNaturalNameEditPart.VISUAL_ID:
return getLiteralUnlimitedNaturalName_5182Parser();
case LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID:
return getLiteralUnlimitedNaturalName_6110Parser();
-
case StringExpressionNameEditPart.VISUAL_ID:
return getStringExpressionName_5183Parser();
case StringExpressionFloatingLabelEditPart.VISUAL_ID:
return getStringExpressionName_6111Parser();
-
case OpaqueExpressionNameEditPart.VISUAL_ID:
return getOpaqueExpressionName_5184Parser();
case OpaqueExpressionFloatingLabelEditPart.VISUAL_ID:
return getOpaqueExpressionName_6112Parser();
-
case TimeExpressionNameEditPart.VISUAL_ID:
return getTimeExpressionName_5185Parser();
case TimeExpressionFloatingLabelEditPart.VISUAL_ID:
return getTimeExpressionName_6113Parser();
-
case ExpressionNameEditPart.VISUAL_ID:
return getExpressionName_5186Parser();
case ExpressionFloatingLabelEditPart.VISUAL_ID:
return getExpressionName_6114Parser();
-
case DurationNameEditPart.VISUAL_ID:
return getDurationName_5187Parser();
case DurationFloatingLabelEditPart.VISUAL_ID:
return getDurationName_6115Parser();
-
case TimeIntervalNameEditPart.VISUAL_ID:
return getTimeIntervalName_5188Parser();
case TimeIntervalFloatingLabelEditPart.VISUAL_ID:
return getTimeIntervalName_6116Parser();
-
case DurationIntervalNameEditPart.VISUAL_ID:
return getDurationIntervalName_5189Parser();
case DurationIntervalFloatingLabelEditPart.VISUAL_ID:
return getDurationIntervalName_6117Parser();
-
case IntervalNameEditPart.VISUAL_ID:
return getIntervalName_5190Parser();
case IntervalFloatingLabelEditPart.VISUAL_ID:
return getIntervalName_6118Parser();
-
case InstanceValueNameEditPart.VISUAL_ID:
return getInstanceValueName_5191Parser();
case InstanceValueFloatingLabelEditPart.VISUAL_ID:
return getInstanceValueName_6119Parser();
-
case CommentBodyEditPart.VISUAL_ID:
return getCommentBody_5192Parser();
-
case DurationConstraintNameEditPart.VISUAL_ID:
return getDurationConstraintName_5193Parser();
case DurationConstraintSpecificationEditPart.VISUAL_ID:
return getDurationConstraintSpecification_6035Parser();
-
case TimeConstraintNameEditPart.VISUAL_ID:
return getTimeConstraintName_5194Parser();
case TimeConstraintSpecificationEditPart.VISUAL_ID:
return getTimeConstraintSpecification_6036Parser();
-
case IntervalConstraintNameEditPart.VISUAL_ID:
return getIntervalConstraintName_5195Parser();
case IntervalConstraintSpecificationEditPart.VISUAL_ID:
return getIntervalConstraintSpecification_6037Parser();
-
case InteractionConstraintNameEditPart.VISUAL_ID:
return getInteractionConstraintName_5196Parser();
case InteractionConstraintSpecificationEditPart.VISUAL_ID:
return getInteractionConstraintSpecification_6038Parser();
-
case ConstraintNameEditPart.VISUAL_ID:
return getConstraintName_5197Parser();
case ConstraintSpecificationEditPart.VISUAL_ID:
return getConstraintSpecification_6039Parser();
-
case BehaviorPortFloatingLabelEditPart.VISUAL_ID:
return getNodeName_6053Parser();
-
case PortNameEditPart.VISUAL_ID:
return getPortName_5125Parser();
case PortAppliedStereotypeEditPart.VISUAL_ID:
return getPortName_6029Parser();
-
case ParameterNameEditPart.VISUAL_ID:
return getParameterName_6033Parser();
case ParameterAppliedStereotypeEditPart.VISUAL_ID:
return getParameterName_6034Parser();
-
case PropertyPartNameEditPartCN.VISUAL_ID:
return getPropertyName_5126Parser();
case PropertyPartFloatingLabelEditPartCN.VISUAL_ID:
return getPropertyName_6054Parser();
-
case CollaborationRoleNameEditPartCN.VISUAL_ID:
return getConnectableElementName_5198Parser();
case CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID:
return getConnectableElementName_6055Parser();
-
case CollaborationUseNameEditPart.VISUAL_ID:
return getCollaborationUseName_5127Parser();
case CollaborationUseFloatingLabelEditPartCN.VISUAL_ID:
return getCollaborationUseName_6056Parser();
-
case ActivityCompositeNameEditPartCN.VISUAL_ID:
return getActivityName_5128Parser();
case ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getActivityName_6057Parser();
-
case InteractionCompositeNameEditPartCN.VISUAL_ID:
return getInteractionName_5129Parser();
case InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getInteractionName_6058Parser();
-
case ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID:
return getProtocolStateMachineName_5130Parser();
case ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getProtocolStateMachineName_6059Parser();
-
case StateMachineCompositeNameEditPartCN.VISUAL_ID:
return getStateMachineName_5131Parser();
case StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getStateMachineName_6060Parser();
-
case FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID:
return getFunctionBehaviorName_5132Parser();
case FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getFunctionBehaviorName_6061Parser();
-
case OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID:
return getOpaqueBehaviorName_5133Parser();
case OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getOpaqueBehaviorName_6062Parser();
-
case ComponentCompositeNameEditPartCN.VISUAL_ID:
return getComponentName_5137Parser();
case ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getComponentName_6063Parser();
-
case DeviceCompositeNameEditPartCN.VISUAL_ID:
return getDeviceName_5138Parser();
case DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getDeviceName_6064Parser();
-
case ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID:
return getExecutionEnvironmentName_5139Parser();
case ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getExecutionEnvironmentName_6065Parser();
-
case NodeCompositeNameEditPartCN.VISUAL_ID:
return getNodeName_5140Parser();
case NodeCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getNodeName_6066Parser();
-
case ClassCompositeNameEditPartCN.VISUAL_ID:
return getClassName_5155Parser();
case ClassCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getClassName_6067Parser();
-
case CollaborationCompositeNameEditPartCN.VISUAL_ID:
return getCollaborationName_5141Parser();
case CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID:
return getCollaborationName_6068Parser();
-
case InterfaceNameEditPartCN.VISUAL_ID:
return getInterfaceName_5154Parser();
case InterfaceFloatingLabelEditPartCN.VISUAL_ID:
return getInterfaceName_6069Parser();
-
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return getPrimitiveTypeName_5134Parser();
case PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID:
return getPrimitiveTypeName_6070Parser();
-
case EnumerationNameEditPartCN.VISUAL_ID:
return getEnumerationName_5135Parser();
case EnumerationFloatingLabelEditPartCN.VISUAL_ID:
return getEnumerationName_6071Parser();
-
case DataTypeNameEditPartCN.VISUAL_ID:
return getDataTypeName_5136Parser();
case DataTypeFloatingLabelEditPartCN.VISUAL_ID:
return getDataTypeName_6072Parser();
-
case ActorNameEditPartCN.VISUAL_ID:
return getActorName_5144Parser();
case ActorFloatingLabelEditPartCN.VISUAL_ID:
return getActorName_6073Parser();
-
case DeploymentSpecificationNameEditPartCN.VISUAL_ID:
return getDeploymentSpecificationName_5145Parser();
case DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID:
return getDeploymentSpecificationName_6074Parser();
-
case ArtifactNameEditPartCN.VISUAL_ID:
return getArtifactName_5146Parser();
case ArtifactFloatingLabelEditPartCN.VISUAL_ID:
return getArtifactName_6075Parser();
-
case InformationItemNameEditPartCN.VISUAL_ID:
return getInformationItemName_5147Parser();
case InformationItemFloatingLabelEditPartCN.VISUAL_ID:
return getInformationItemName_6076Parser();
-
case SignalNameEditPartCN.VISUAL_ID:
return getSignalName_5148Parser();
case SignalFloatingLabelEditPartCN.VISUAL_ID:
return getSignalName_6077Parser();
-
case UseCaseNameEditPartCN.VISUAL_ID:
return getUseCaseName_5149Parser();
case UseCaseFloatingLabelEditPartCN.VISUAL_ID:
return getUseCaseName_6078Parser();
-
case CommentBodyEditPartCN.VISUAL_ID:
return getCommentBody_5150Parser();
-
case DurationConstraintNameEditPartCN.VISUAL_ID:
return getDurationConstraintName_6040Parser();
case DurationConstraintSpecificationEditPartCN.VISUAL_ID:
return getDurationConstraintSpecification_6041Parser();
-
case TimeConstraintNameEditPartCN.VISUAL_ID:
return getTimeConstraintName_6042Parser();
case TimeConstraintSpecificationEditPartCN.VISUAL_ID:
return getTimeConstraintSpecification_6043Parser();
-
case IntervalConstraintNameEditPartCN.VISUAL_ID:
return getIntervalConstraintName_6044Parser();
case IntervalConstraintSpecificationEditPartCN.VISUAL_ID:
return getIntervalConstraintSpecification_6045Parser();
-
case InteractionConstraintNameEditPartCN.VISUAL_ID:
return getInteractionConstraintName_6046Parser();
case InteractionConstraintSpecificationEditPartCN.VISUAL_ID:
return getInteractionConstraintSpecification_6047Parser();
-
case ConstraintNameEditPartCN.VISUAL_ID:
return getConstraintName_6048Parser();
case ConstraintSpecificationEditPartCN.VISUAL_ID:
return getConstraintSpecification_6049Parser();
-
case PropertyEditPartCLN.VISUAL_ID:
return getProperty_3101Parser();
case OperationEditPartCLN.VISUAL_ID:
return getOperation_3102Parser();
case EnumerationLiteralEditPartCLN.VISUAL_ID:
return getEnumerationLiteral_3066Parser();
-
-
-
-
case ComponentRealizationNameEditPart.VISUAL_ID:
return getComponentRealizationName_6001Parser();
case ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID:
return getComponentRealizationName_6015Parser();
-
case InterfaceRealizationNameEditPart.VISUAL_ID:
return getInterfaceRealizationName_6002Parser();
case InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID:
return getInterfaceRealizationName_6016Parser();
-
case SubstitutionNameEditPart.VISUAL_ID:
return getSubstitutionName_6003Parser();
case SubstitutionAppliedStereotypeEditPart.VISUAL_ID:
return getSubstitutionName_6017Parser();
-
case RealizationNameEditPart.VISUAL_ID:
return getRealizationName_6004Parser();
case RealizationAppliedStereotypeEditPart.VISUAL_ID:
return getRealizationName_6018Parser();
-
case ManifestationNameEditPart.VISUAL_ID:
return getManifestationName_6005Parser();
case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
return getManifestationName_6019Parser();
-
case AbstractionNameEditPart.VISUAL_ID:
return getAbstractionName_6006Parser();
case AbstractionAppliedStereotypeEditPart.VISUAL_ID:
return getAbstractionName_6020Parser();
-
case UsageNameEditPart.VISUAL_ID:
return getUsageName_6007Parser();
case UsageAppliedStereotypeEditPart.VISUAL_ID:
return getUsageName_6021Parser();
-
case DeploymentNameEditPart.VISUAL_ID:
return getDeploymentName_6008Parser();
case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
return getDeploymentName_6022Parser();
-
case RoleBindingRoleNameEditPart.VISUAL_ID:
return getDependencyName_6027Parser();
case RoleBindingAppliedStereotypeEditPart.VISUAL_ID:
return getDependencyName_6028Parser();
-
case DependencyNameEditPart.VISUAL_ID:
return getDependencyName_6009Parser();
case DependencyAppliedStereotypeEditPart.VISUAL_ID:
return getDependencyName_6023Parser();
-
case ConnectorAppliedStereotypeEditPart.VISUAL_ID:
return getConnectorName_6025Parser();
case ConnectorNameEditPart.VISUAL_ID:
@@ -4254,23 +3833,16 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getConnectorName_6051Parser();
case ConnectorMultiplicityTargetEditPart.VISUAL_ID:
return getConnectorName_6052Parser();
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return getGeneralizationIsSubstitutable_6024Parser();
-
-
-
-
case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
return getInformationFlowName_6032Parser();
-
}
return null;
}
/**
* Utility method that consults ParserService
- *
* @generated
*/
public static IParser getParser(IElementType type, EObject object, String parserHint) {
@@ -4280,15 +3852,13 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- @Override
public IParser getParser(IAdaptable hint) {
- String vid = (String) hint.getAdapter(String.class);
- if (vid != null) {
+ 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) {
+ View view = (View)hint.getAdapter(View.class);
+ if(view != null) {
return getParser(UMLVisualIDRegistry.getVisualID(view));
}
return null;
@@ -4297,12 +3867,10 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- @Override
public boolean provides(IOperation operation) {
- if (operation instanceof GetParserOperation) {
- IAdaptable hint =
- ((GetParserOperation) operation).getHint();
- if (UMLElementTypes.getElement(hint) == null) {
+ if(operation instanceof GetParserOperation) {
+ IAdaptable hint = ((GetParserOperation)operation).getHint();
+ if(UMLElementTypes.getElement(hint) == null) {
return false;
}
return getParser(hint) != null;
@@ -4332,9 +3900,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- @Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (IElementType.class.equals(adapter)) {
+ if(IElementType.class.equals(adapter)) {
return elementType;
}
return super.getAdapter(adapter);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationDecoratorProvider.java
index 19980582c23..a941cce9379 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationDecoratorProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationDecoratorProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -35,23 +35,21 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider
/**
* @generated
*/
- @Override
public void createDecorators(IDecoratorTarget decoratorTarget) {
- EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
- if (editPart instanceof GraphicalEditPart ||
- editPart instanceof AbstractConnectionEditPart) {
+ 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()) {
+ if((model instanceof View)) {
+ View view = (View)model;
+ if(!(view instanceof Edge) && !view.isSetElement()) {
return;
}
}
EditDomain ed = editPart.getViewer().getEditDomain();
- if (!(ed instanceof DiagramEditDomain)) {
+ if(!(ed instanceof DiagramEditDomain)) {
return;
}
- if (((DiagramEditDomain) ed).getEditorPart() instanceof UMLDiagramEditor) {
+ if(((DiagramEditDomain)ed).getEditorPart() instanceof UMLDiagramEditor) {
decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
}
}
@@ -60,15 +58,12 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider
/**
* @generated
*/
- @Override
public boolean provides(IOperation operation) {
- if (!(operation instanceof CreateDecoratorsOperation)) {
+ if(!(operation instanceof CreateDecoratorsOperation)) {
return false;
}
- IDecoratorTarget decoratorTarget =
- ((CreateDecoratorsOperation) operation).getDecoratorTarget();
- View view = (View) decoratorTarget.getAdapter(
- View.class);
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
+ View view = (View)decoratorTarget.getAdapter(View.class);
return view != null && CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationProvider.java
index 6d5dab16a65..3b97299ede0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLValidationProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -40,6 +40,7 @@ public class UMLValidationProvider {
public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
final Runnable op = operation;
Runnable task = new Runnable() {
+
@Override
public void run() {
try {
@@ -50,7 +51,7 @@ public class UMLValidationProvider {
}
}
};
- if (editingDomain != null) {
+ if(editingDomain != null) {
try {
editingDomain.runExclusive(task);
} catch (Exception e) {
@@ -65,11 +66,11 @@ public class UMLValidationProvider {
* @generated
*/
static boolean isInDefaultEditorContext(Object object) {
- if (shouldConstraintsBePrivate() && !constraintsActive) {
+ if(shouldConstraintsBePrivate() && !constraintsActive) {
return false;
}
- if (object instanceof View) {
- return constraintsActive && CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object));
+ if(object instanceof View) {
+ return constraintsActive && CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View)object));
}
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java
index bdb3df72ada..717f958945d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -71,18 +71,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- @Override
public final boolean provides(IOperation operation) {
- if (operation instanceof CreateViewForKindOperation) {
- return provides((CreateViewForKindOperation) 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);
+ 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;
}
@@ -92,23 +91,20 @@ 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
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
- if (!getDiagramProvidedId().equals(modelID)) {
+ if(!getDiagramProvidedId().equals(modelID)) {
return false;
}
-
int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if (Node.class.isAssignableFrom(op.getViewKind())) {
+ if(Node.class.isAssignableFrom(op.getViewKind())) {
return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
-
return true;
}
@@ -138,46 +134,38 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
- if (op.getContainerView() == null) {
+ if(op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
- if (op.getSemanticHint() == null) {
+ 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) {
+ 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
- }
+ if(elementType != null) {
+ if(!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ return false; // foreign element type
}
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (!op.getSemanticHint().equals(elementTypeHint)) {
+ 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
- }
+ //if (domainElement != null && visualID != org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ // return false; // visual id for node EClass should match visual id from element type
+ //}
} else {
- if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
+ if(!CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
- switch (visualID) {
+ switch(visualID) {
case BehaviorPortEditPart.VISUAL_ID:
break; // pure design element
case ActivityCompositeEditPart.VISUAL_ID:
@@ -265,7 +253,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case ConstraintEditPartCN.VISUAL_ID:
case PropertyEditPartCLN.VISUAL_ID:
case OperationEditPartCLN.VISUAL_ID:
- if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ if(domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
@@ -274,28 +262,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
}
}
}
- return ActivityCompositeEditPart.VISUAL_ID == visualID || InteractionCompositeEditPart.VISUAL_ID == visualID || ProtocolStateMachineCompositeEditPart.VISUAL_ID == visualID || StateMachineCompositeEditPart.VISUAL_ID == visualID
- || FunctionBehaviorCompositeEditPart.VISUAL_ID == visualID || OpaqueBehaviorCompositeEditPart.VISUAL_ID == visualID || ComponentCompositeEditPart.VISUAL_ID == visualID || DeviceCompositeEditPart.VISUAL_ID == visualID
- || ExecutionEnvironmentCompositeEditPart.VISUAL_ID == visualID || NodeCompositeEditPart.VISUAL_ID == visualID || ClassCompositeEditPart.VISUAL_ID == visualID || CollaborationCompositeEditPart.VISUAL_ID == visualID
- || InterfaceEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ActorEditPart.VISUAL_ID == visualID
- || DeploymentSpecificationEditPart.VISUAL_ID == visualID || ArtifactEditPart.VISUAL_ID == visualID || InformationItemEditPart.VISUAL_ID == visualID || SignalEditPart.VISUAL_ID == visualID || UseCaseEditPart.VISUAL_ID == visualID
- || SignalEventEditPart.VISUAL_ID == visualID || CallEventEditPart.VISUAL_ID == visualID || AnyReceiveEventEditPart.VISUAL_ID == visualID || ChangeEventEditPart.VISUAL_ID == visualID || TimeEventEditPart.VISUAL_ID == visualID
- || DurationObservationEditPart.VISUAL_ID == visualID || TimeObservationEditPart.VISUAL_ID == visualID || LiteralBooleanEditPart.VISUAL_ID == visualID || LiteralIntegerEditPart.VISUAL_ID == visualID || LiteralNullEditPart.VISUAL_ID == visualID
- || LiteralStringEditPart.VISUAL_ID == visualID || LiteralUnlimitedNaturalEditPart.VISUAL_ID == visualID || StringExpressionEditPart.VISUAL_ID == visualID || OpaqueExpressionEditPart.VISUAL_ID == visualID
- || TimeExpressionEditPart.VISUAL_ID == visualID || ExpressionEditPart.VISUAL_ID == visualID || DurationEditPart.VISUAL_ID == visualID || TimeIntervalEditPart.VISUAL_ID == visualID || DurationIntervalEditPart.VISUAL_ID == visualID
- || IntervalEditPart.VISUAL_ID == visualID || InstanceValueEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || DurationConstraintEditPart.VISUAL_ID == visualID || TimeConstraintEditPart.VISUAL_ID == visualID
- || IntervalConstraintEditPart.VISUAL_ID == visualID || InteractionConstraintEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || BehaviorPortEditPart.VISUAL_ID == visualID || PortEditPart.VISUAL_ID == visualID
- || ParameterEditPart.VISUAL_ID == visualID || PropertyPartEditPartCN.VISUAL_ID == visualID || CollaborationRoleEditPartCN.VISUAL_ID == visualID || CollaborationUseEditPartCN.VISUAL_ID == visualID
- || ActivityCompositeEditPartCN.VISUAL_ID == visualID || InteractionCompositeEditPartCN.VISUAL_ID == visualID || ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == visualID || StateMachineCompositeEditPartCN.VISUAL_ID == visualID
- || FunctionBehaviorCompositeEditPartCN.VISUAL_ID == visualID || OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == visualID || ComponentCompositeEditPartCN.VISUAL_ID == visualID || DeviceCompositeEditPartCN.VISUAL_ID == visualID
- || ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == visualID || NodeCompositeEditPartCN.VISUAL_ID == visualID || ClassCompositeEditPartCN.VISUAL_ID == visualID || CollaborationCompositeEditPartCN.VISUAL_ID == visualID
- || InterfaceEditPartCN.VISUAL_ID == visualID || PrimitiveTypeEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID || ActorEditPartCN.VISUAL_ID == visualID
- || DeploymentSpecificationEditPartCN.VISUAL_ID == visualID || ArtifactEditPartCN.VISUAL_ID == visualID || InformationItemEditPartCN.VISUAL_ID == visualID || SignalEditPartCN.VISUAL_ID == visualID || UseCaseEditPartCN.VISUAL_ID == visualID
- || CommentEditPartCN.VISUAL_ID == visualID || DurationConstraintEditPartCN.VISUAL_ID == visualID || TimeConstraintEditPartCN.VISUAL_ID == visualID || IntervalConstraintEditPartCN.VISUAL_ID == visualID
- || InteractionConstraintEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || PropertyEditPartCLN.VISUAL_ID == visualID || OperationEditPartCLN.VISUAL_ID == visualID
- || EnumerationLiteralEditPartCLN.VISUAL_ID == visualID;
-
-
+ return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
/**
@@ -303,37 +270,36 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- // RS: add code for extended types creation
- if (elementType instanceof IExtendedHintedElementType) {
+ //RS: add code for extended types creation
+ if(elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
- if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
+ if(!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
return false; // foreign element type.
}
} else {
- if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ if(!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
}
- // if (!org.eclipse.papyrus.uml.diagram.composite.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.composite.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()))) {
+ 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
- }
+ //int visualID = org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getVisualID(elementTypeHint);
+ //org.eclipse.emf.ecore.EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ //if (domainElement != null && visualID != org.eclipse.papyrus.uml.diagram.composite.part.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();
@@ -348,16 +314,15 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @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) {
+ if(semanticHint == null) {
visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
} else {
visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
}
- switch (visualID) {
+ switch(visualID) {
case ActivityCompositeEditPart.VISUAL_ID:
return createActivity_2060(domainElement, containerView, index, persisted, preferencesHint);
case InteractionCompositeEditPart.VISUAL_ID:
@@ -538,11 +503,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @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)) {
+ String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
+ switch(UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
case BehaviorPortLinkEditPart.VISUAL_ID:
return createLink_4022(containerView, index, persisted, preferencesHint);
case LinkDescriptorEditPart.VISUAL_ID:
@@ -598,14 +562,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeNameEditPart.VISUAL_ID));
Node label6079 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeFloatingLabelEditPart.VISUAL_ID));
label6079.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6079 = (Location) label6079.getLayoutConstraint();
+ Location location6079 = (Location)label6079.getLayoutConstraint();
location6079.setX(0);
location6079.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ActivityCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -623,14 +586,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeNameEditPart.VISUAL_ID));
Node label6080 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeFloatingLabelEditPart.VISUAL_ID));
label6080.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6080 = (Location) label6080.getLayoutConstraint();
+ Location location6080 = (Location)label6080.getLayoutConstraint();
location6080.setX(0);
location6080.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -648,14 +610,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ProtocolStateMachine");
Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPart.VISUAL_ID));
Node label6081 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeFloatingLabelEditPart.VISUAL_ID));
label6081.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6081 = (Location) label6081.getLayoutConstraint();
+ Location location6081 = (Location)label6081.getLayoutConstraint();
location6081.setX(0);
location6081.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -673,14 +634,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StateMachine");
Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPart.VISUAL_ID));
Node label6082 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeFloatingLabelEditPart.VISUAL_ID));
label6082.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6082 = (Location) label6082.getLayoutConstraint();
+ Location location6082 = (Location)label6082.getLayoutConstraint();
location6082.setX(0);
location6082.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(StateMachineCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -698,14 +658,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FunctionBehavior");
Node label5116 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPart.VISUAL_ID));
Node label6083 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeFloatingLabelEditPart.VISUAL_ID));
label6083.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6083 = (Location) label6083.getLayoutConstraint();
+ Location location6083 = (Location)label6083.getLayoutConstraint();
location6083.setX(0);
location6083.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -723,14 +682,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueBehavior");
Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPart.VISUAL_ID));
Node label6084 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeFloatingLabelEditPart.VISUAL_ID));
label6084.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6084 = (Location) label6084.getLayoutConstraint();
+ Location location6084 = (Location)label6084.getLayoutConstraint();
location6084.setX(0);
location6084.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -748,14 +706,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeNameEditPart.VISUAL_ID));
Node label6085 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeFloatingLabelEditPart.VISUAL_ID));
label6085.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6085 = (Location) label6085.getLayoutConstraint();
+ Location location6085 = (Location)label6085.getLayoutConstraint();
location6085.setX(0);
location6085.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -773,14 +730,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
Node label5122 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeNameEditPart.VISUAL_ID));
Node label6086 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeFloatingLabelEditPart.VISUAL_ID));
label6086.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6086 = (Location) label6086.getLayoutConstraint();
+ Location location6086 = (Location)label6086.getLayoutConstraint();
location6086.setX(0);
location6086.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -798,14 +754,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID));
Node label6087 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeFloatingLabelEditPart.VISUAL_ID));
label6087.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6087 = (Location) label6087.getLayoutConstraint();
+ Location location6087 = (Location)label6087.getLayoutConstraint();
location6087.setX(0);
location6087.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -823,14 +778,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeNameEditPart.VISUAL_ID));
Node label6088 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeFloatingLabelEditPart.VISUAL_ID));
label6088.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6088 = (Location) label6088.getLayoutConstraint();
+ Location location6088 = (Location)label6088.getLayoutConstraint();
location6088.setX(0);
location6088.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -848,14 +802,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeNameEditPart.VISUAL_ID));
Node label6089 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeFloatingLabelEditPart.VISUAL_ID));
label6089.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6089 = (Location) label6089.getLayoutConstraint();
+ Location location6089 = (Location)label6089.getLayoutConstraint();
location6089.setX(0);
location6089.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ClassCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -873,14 +826,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Collaboration");
Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPart.VISUAL_ID));
Node label6090 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeFloatingLabelEditPart.VISUAL_ID));
label6090.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6090 = (Location) label6090.getLayoutConstraint();
+ Location location6090 = (Location)label6090.getLayoutConstraint();
location6090.setX(0);
location6090.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(CollaborationCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -898,14 +850,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID));
Node label6091 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingLabelEditPart.VISUAL_ID));
label6091.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6091 = (Location) label6091.getLayoutConstraint();
+ Location location6091 = (Location)label6091.getLayoutConstraint();
location6091.setX(0);
location6091.setY(5);
return node;
@@ -921,14 +872,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
Node label6092 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeFloatingLabelEditPart.VISUAL_ID));
label6092.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6092 = (Location) label6092.getLayoutConstraint();
+ Location location6092 = (Location)label6092.getLayoutConstraint();
location6092.setX(0);
location6092.setY(5);
return node;
@@ -944,14 +894,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
Node label6093 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationFloatingLabelEditPart.VISUAL_ID));
label6093.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6093 = (Location) label6093.getLayoutConstraint();
+ Location location6093 = (Location)label6093.getLayoutConstraint();
location6093.setX(0);
location6093.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -969,14 +918,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
Node label6094 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeFloatingLabelEditPart.VISUAL_ID));
label6094.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6094 = (Location) label6094.getLayoutConstraint();
+ Location location6094 = (Location)label6094.getLayoutConstraint();
location6094.setX(0);
location6094.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -995,14 +943,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Actor");
Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(ActorNameEditPart.VISUAL_ID));
Node label6095 = createLabel(node, UMLVisualIDRegistry.getType(ActorFloatingLabelEditPart.VISUAL_ID));
label6095.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6095 = (Location) label6095.getLayoutConstraint();
+ Location location6095 = (Location)label6095.getLayoutConstraint();
location6095.setX(0);
location6095.setY(5);
return node;
@@ -1018,14 +965,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DeploymentSpecification");
Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPart.VISUAL_ID));
Node label6096 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationFloatingLabelEditPart.VISUAL_ID));
label6096.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6096 = (Location) label6096.getLayoutConstraint();
+ Location location6096 = (Location)label6096.getLayoutConstraint();
location6096.setX(0);
location6096.setY(5);
return node;
@@ -1041,14 +987,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
Node label6097 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactFloatingLabelEditPart.VISUAL_ID));
label6097.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6097 = (Location) label6097.getLayoutConstraint();
+ Location location6097 = (Location)label6097.getLayoutConstraint();
location6097.setX(0);
location6097.setY(5);
return node;
@@ -1064,14 +1009,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPart.VISUAL_ID));
Node label6098 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemFloatingLabelEditPart.VISUAL_ID));
label6098.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6098 = (Location) label6098.getLayoutConstraint();
+ Location location6098 = (Location)label6098.getLayoutConstraint();
location6098.setX(0);
location6098.setY(5);
return node;
@@ -1087,14 +1031,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPart.VISUAL_ID));
Node label6099 = createLabel(node, UMLVisualIDRegistry.getType(SignalFloatingLabelEditPart.VISUAL_ID));
label6099.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6099 = (Location) label6099.getLayoutConstraint();
+ Location location6099 = (Location)label6099.getLayoutConstraint();
location6099.setX(0);
location6099.setY(5);
return node;
@@ -1110,14 +1053,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseNameEditPart.VISUAL_ID));
Node label6100 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseFloatingLabelEditPart.VISUAL_ID));
label6100.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6100 = (Location) label6100.getLayoutConstraint();
+ Location location6100 = (Location)label6100.getLayoutConstraint();
location6100.setX(0);
location6100.setY(5);
return node;
@@ -1133,14 +1075,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SignalEvent");
Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(SignalEventNameEditPart.VISUAL_ID));
Node label6101 = createLabel(node, UMLVisualIDRegistry.getType(SignalEventFloatingLabelEditPart.VISUAL_ID));
label6101.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6101 = (Location) label6101.getLayoutConstraint();
+ Location location6101 = (Location)label6101.getLayoutConstraint();
location6101.setX(0);
location6101.setY(5);
return node;
@@ -1156,14 +1097,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallEvent");
Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(CallEventNameEditPart.VISUAL_ID));
Node label6102 = createLabel(node, UMLVisualIDRegistry.getType(CallEventFloatingLabelEditPart.VISUAL_ID));
label6102.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6102 = (Location) label6102.getLayoutConstraint();
+ Location location6102 = (Location)label6102.getLayoutConstraint();
location6102.setX(0);
location6102.setY(5);
return node;
@@ -1179,14 +1119,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AnyReceiveEvent");
Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(AnyReceiveEventNameEditPart.VISUAL_ID));
Node label6103 = createLabel(node, UMLVisualIDRegistry.getType(AnyReceiveEventFloatingLabelEditPart.VISUAL_ID));
label6103.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6103 = (Location) label6103.getLayoutConstraint();
+ Location location6103 = (Location)label6103.getLayoutConstraint();
location6103.setX(0);
location6103.setY(5);
return node;
@@ -1202,14 +1141,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ChangeEvent");
Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(ChangeEventNameEditPart.VISUAL_ID));
Node label6104 = createLabel(node, UMLVisualIDRegistry.getType(ChangeEventFloatingLabelEditPart.VISUAL_ID));
label6104.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6104 = (Location) label6104.getLayoutConstraint();
+ Location location6104 = (Location)label6104.getLayoutConstraint();
location6104.setX(0);
location6104.setY(5);
return node;
@@ -1225,14 +1163,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeEvent");
Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(TimeEventNameEditPart.VISUAL_ID));
Node label6105 = createLabel(node, UMLVisualIDRegistry.getType(TimeEventFloatingLabelEditPart.VISUAL_ID));
label6105.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6105 = (Location) label6105.getLayoutConstraint();
+ Location location6105 = (Location)label6105.getLayoutConstraint();
location6105.setX(0);
location6105.setY(5);
return node;
@@ -1248,18 +1185,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationObservation");
Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationNameEditPart.VISUAL_ID));
label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5151 = (Location) label5151.getLayoutConstraint();
+ Location location5151 = (Location)label5151.getLayoutConstraint();
location5151.setX(25);
location5151.setY(3);
Node label5152 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationStereotypeLabelEditPart.VISUAL_ID));
label5152.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5152 = (Location) label5152.getLayoutConstraint();
+ Location location5152 = (Location)label5152.getLayoutConstraint();
location5152.setX(25);
location5152.setY(-10);
return node;
@@ -1275,18 +1211,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
label5142.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5142 = (Location) label5142.getLayoutConstraint();
+ Location location5142 = (Location)label5142.getLayoutConstraint();
location5142.setX(25);
location5142.setY(3);
Node label5143 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationStereotypeLabelEditPart.VISUAL_ID));
label5143.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5143 = (Location) label5143.getLayoutConstraint();
+ Location location5143 = (Location)label5143.getLayoutConstraint();
location5143.setX(25);
location5143.setY(-10);
return node;
@@ -1302,14 +1237,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralBoolean");
Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(LiteralBooleanNameEditPart.VISUAL_ID));
Node label6106 = createLabel(node, UMLVisualIDRegistry.getType(LiteralBooleanFloatingLabelEditPart.VISUAL_ID));
label6106.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6106 = (Location) label6106.getLayoutConstraint();
+ Location location6106 = (Location)label6106.getLayoutConstraint();
location6106.setX(0);
location6106.setY(5);
return node;
@@ -1325,14 +1259,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralInteger");
Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(LiteralIntegerNameEditPart.VISUAL_ID));
Node label6107 = createLabel(node, UMLVisualIDRegistry.getType(LiteralIntegerFloatingLabelEditPart.VISUAL_ID));
label6107.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6107 = (Location) label6107.getLayoutConstraint();
+ Location location6107 = (Location)label6107.getLayoutConstraint();
location6107.setX(0);
location6107.setY(5);
return node;
@@ -1348,14 +1281,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralNull");
Node label5180 = createLabel(node, UMLVisualIDRegistry.getType(LiteralNullNameEditPart.VISUAL_ID));
Node label6108 = createLabel(node, UMLVisualIDRegistry.getType(LiteralNullFloatingLabelEditPart.VISUAL_ID));
label6108.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6108 = (Location) label6108.getLayoutConstraint();
+ Location location6108 = (Location)label6108.getLayoutConstraint();
location6108.setX(0);
location6108.setY(5);
return node;
@@ -1371,14 +1303,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralString");
Node label5181 = createLabel(node, UMLVisualIDRegistry.getType(LiteralStringNameEditPart.VISUAL_ID));
Node label6109 = createLabel(node, UMLVisualIDRegistry.getType(LiteralStringFloatingLabelEditPart.VISUAL_ID));
label6109.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6109 = (Location) label6109.getLayoutConstraint();
+ Location location6109 = (Location)label6109.getLayoutConstraint();
location6109.setX(0);
location6109.setY(5);
return node;
@@ -1394,14 +1325,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralUnlimitedNatural");
Node label5182 = createLabel(node, UMLVisualIDRegistry.getType(LiteralUnlimitedNaturalNameEditPart.VISUAL_ID));
Node label6110 = createLabel(node, UMLVisualIDRegistry.getType(LiteralUnlimitedNaturalFloatingLabelEditPart.VISUAL_ID));
label6110.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6110 = (Location) label6110.getLayoutConstraint();
+ Location location6110 = (Location)label6110.getLayoutConstraint();
location6110.setX(0);
location6110.setY(5);
return node;
@@ -1417,14 +1347,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StringExpression");
Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(StringExpressionNameEditPart.VISUAL_ID));
Node label6111 = createLabel(node, UMLVisualIDRegistry.getType(StringExpressionFloatingLabelEditPart.VISUAL_ID));
label6111.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6111 = (Location) label6111.getLayoutConstraint();
+ Location location6111 = (Location)label6111.getLayoutConstraint();
location6111.setX(0);
location6111.setY(5);
return node;
@@ -1440,14 +1369,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueExpression");
Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueExpressionNameEditPart.VISUAL_ID));
Node label6112 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueExpressionFloatingLabelEditPart.VISUAL_ID));
label6112.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6112 = (Location) label6112.getLayoutConstraint();
+ Location location6112 = (Location)label6112.getLayoutConstraint();
location6112.setX(0);
location6112.setY(5);
return node;
@@ -1463,14 +1391,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeExpression");
Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(TimeExpressionNameEditPart.VISUAL_ID));
Node label6113 = createLabel(node, UMLVisualIDRegistry.getType(TimeExpressionFloatingLabelEditPart.VISUAL_ID));
label6113.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6113 = (Location) label6113.getLayoutConstraint();
+ Location location6113 = (Location)label6113.getLayoutConstraint();
location6113.setX(0);
location6113.setY(5);
return node;
@@ -1486,14 +1413,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Expression");
Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(ExpressionNameEditPart.VISUAL_ID));
Node label6114 = createLabel(node, UMLVisualIDRegistry.getType(ExpressionFloatingLabelEditPart.VISUAL_ID));
label6114.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6114 = (Location) label6114.getLayoutConstraint();
+ Location location6114 = (Location)label6114.getLayoutConstraint();
location6114.setX(0);
location6114.setY(5);
return node;
@@ -1509,14 +1435,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Duration");
Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(DurationNameEditPart.VISUAL_ID));
Node label6115 = createLabel(node, UMLVisualIDRegistry.getType(DurationFloatingLabelEditPart.VISUAL_ID));
label6115.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6115 = (Location) label6115.getLayoutConstraint();
+ Location location6115 = (Location)label6115.getLayoutConstraint();
location6115.setX(0);
location6115.setY(5);
return node;
@@ -1532,14 +1457,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeInterval");
Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(TimeIntervalNameEditPart.VISUAL_ID));
Node label6116 = createLabel(node, UMLVisualIDRegistry.getType(TimeIntervalFloatingLabelEditPart.VISUAL_ID));
label6116.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6116 = (Location) label6116.getLayoutConstraint();
+ Location location6116 = (Location)label6116.getLayoutConstraint();
location6116.setX(0);
location6116.setY(5);
return node;
@@ -1555,14 +1479,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationInterval");
Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(DurationIntervalNameEditPart.VISUAL_ID));
Node label6117 = createLabel(node, UMLVisualIDRegistry.getType(DurationIntervalFloatingLabelEditPart.VISUAL_ID));
label6117.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6117 = (Location) label6117.getLayoutConstraint();
+ Location location6117 = (Location)label6117.getLayoutConstraint();
location6117.setX(0);
location6117.setY(5);
return node;
@@ -1578,14 +1501,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interval");
Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(IntervalNameEditPart.VISUAL_ID));
Node label6118 = createLabel(node, UMLVisualIDRegistry.getType(IntervalFloatingLabelEditPart.VISUAL_ID));
label6118.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6118 = (Location) label6118.getLayoutConstraint();
+ Location location6118 = (Location)label6118.getLayoutConstraint();
location6118.setX(0);
location6118.setY(5);
return node;
@@ -1601,14 +1523,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InstanceValue");
Node label5191 = createLabel(node, UMLVisualIDRegistry.getType(InstanceValueNameEditPart.VISUAL_ID));
Node label6119 = createLabel(node, UMLVisualIDRegistry.getType(InstanceValueFloatingLabelEditPart.VISUAL_ID));
label6119.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6119 = (Location) label6119.getLayoutConstraint();
+ Location location6119 = (Location)label6119.getLayoutConstraint();
location6119.setX(0);
location6119.setY(5);
return node;
@@ -1624,9 +1545,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label5192 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
return node;
@@ -1642,9 +1562,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
Node label5193 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintNameEditPart.VISUAL_ID));
Node label6035 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintSpecificationEditPart.VISUAL_ID));
@@ -1661,9 +1580,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
Node label5194 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintNameEditPart.VISUAL_ID));
Node label6036 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintSpecificationEditPart.VISUAL_ID));
@@ -1680,9 +1598,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
Node label5195 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintNameEditPart.VISUAL_ID));
Node label6037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintSpecificationEditPart.VISUAL_ID));
@@ -1699,9 +1616,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionConstraint");
Node label5196 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintNameEditPart.VISUAL_ID));
Node label6038 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintSpecificationEditPart.VISUAL_ID));
@@ -1718,9 +1634,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label5197 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
Node label6039 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPart.VISUAL_ID));
@@ -1736,12 +1651,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(BehaviorPortEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
Node label6053 = createLabel(node, UMLVisualIDRegistry.getType(BehaviorPortFloatingLabelEditPart.VISUAL_ID));
label6053.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6053 = (Location) label6053.getLayoutConstraint();
+ Location location6053 = (Location)label6053.getLayoutConstraint();
location6053.setX(0);
location6053.setY(5);
return node;
@@ -1756,18 +1670,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port");
Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID));
label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5125 = (Location) label5125.getLayoutConstraint();
+ Location location5125 = (Location)label5125.getLayoutConstraint();
location5125.setX(25);
location5125.setY(3);
Node label6029 = createLabel(node, UMLVisualIDRegistry.getType(PortAppliedStereotypeEditPart.VISUAL_ID));
label6029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6029 = (Location) label6029.getLayoutConstraint();
+ Location location6029 = (Location)label6029.getLayoutConstraint();
location6029.setX(25);
location6029.setY(-10);
return node;
@@ -1782,18 +1695,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ParameterEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter");
Node label6033 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNameEditPart.VISUAL_ID));
label6033.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6033 = (Location) label6033.getLayoutConstraint();
+ Location location6033 = (Location)label6033.getLayoutConstraint();
location6033.setX(25);
location6033.setY(3);
Node label6034 = createLabel(node, UMLVisualIDRegistry.getType(ParameterAppliedStereotypeEditPart.VISUAL_ID));
label6034.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6034 = (Location) label6034.getLayoutConstraint();
+ Location location6034 = (Location)label6034.getLayoutConstraint();
location6034.setX(25);
location6034.setY(-10);
return node;
@@ -1808,14 +1720,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(PropertyPartEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(PropertyPartNameEditPartCN.VISUAL_ID));
Node label6054 = createLabel(node, UMLVisualIDRegistry.getType(PropertyPartFloatingLabelEditPartCN.VISUAL_ID));
label6054.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6054 = (Location) label6054.getLayoutConstraint();
+ Location location6054 = (Location)label6054.getLayoutConstraint();
location6054.setX(0);
location6054.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(PropertyPartCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1832,14 +1743,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(CollaborationRoleEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CollaborationRole");
Node label5198 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationRoleNameEditPartCN.VISUAL_ID));
Node label6055 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationRoleFloatingLabelEditPartCN.VISUAL_ID));
label6055.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6055 = (Location) label6055.getLayoutConstraint();
+ Location location6055 = (Location)label6055.getLayoutConstraint();
location6055.setX(0);
location6055.setY(5);
return node;
@@ -1854,14 +1764,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(CollaborationUseEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CollaborationUse");
Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationUseNameEditPart.VISUAL_ID));
Node label6056 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationUseFloatingLabelEditPartCN.VISUAL_ID));
label6056.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6056 = (Location) label6056.getLayoutConstraint();
+ Location location6056 = (Location)label6056.getLayoutConstraint();
location6056.setX(0);
location6056.setY(5);
return node;
@@ -1876,14 +1785,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ActivityCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeNameEditPartCN.VISUAL_ID));
Node label6057 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6057.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6057 = (Location) label6057.getLayoutConstraint();
+ Location location6057 = (Location)label6057.getLayoutConstraint();
location6057.setX(0);
location6057.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ActivityCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1900,14 +1808,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(InteractionCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeNameEditPartCN.VISUAL_ID));
Node label6058 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6058.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6058 = (Location) label6058.getLayoutConstraint();
+ Location location6058 = (Location)label6058.getLayoutConstraint();
location6058.setX(0);
location6058.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1924,14 +1831,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ProtocolStateMachine");
Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID));
Node label6059 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6059.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6059 = (Location) label6059.getLayoutConstraint();
+ Location location6059 = (Location)label6059.getLayoutConstraint();
location6059.setX(0);
location6059.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1948,14 +1854,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(StateMachineCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StateMachine");
Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPartCN.VISUAL_ID));
Node label6060 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6060.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6060 = (Location) label6060.getLayoutConstraint();
+ Location location6060 = (Location)label6060.getLayoutConstraint();
location6060.setX(0);
location6060.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(StateMachineCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1972,14 +1877,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(FunctionBehaviorCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FunctionBehavior");
Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID));
Node label6061 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6061.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6061 = (Location) label6061.getLayoutConstraint();
+ Location location6061 = (Location)label6061.getLayoutConstraint();
location6061.setX(0);
location6061.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1996,14 +1900,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueBehavior");
Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID));
Node label6062 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6062.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6062 = (Location) label6062.getLayoutConstraint();
+ Location location6062 = (Location)label6062.getLayoutConstraint();
location6062.setX(0);
location6062.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2020,14 +1923,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ComponentCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeNameEditPartCN.VISUAL_ID));
Node label6063 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6063.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6063 = (Location) label6063.getLayoutConstraint();
+ Location location6063 = (Location)label6063.getLayoutConstraint();
location6063.setX(0);
location6063.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2044,14 +1946,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DeviceCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeNameEditPartCN.VISUAL_ID));
Node label6064 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6064.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6064 = (Location) label6064.getLayoutConstraint();
+ Location location6064 = (Location)label6064.getLayoutConstraint();
location6064.setX(0);
location6064.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2068,14 +1969,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID));
Node label6065 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6065.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6065 = (Location) label6065.getLayoutConstraint();
+ Location location6065 = (Location)label6065.getLayoutConstraint();
location6065.setX(0);
location6065.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2092,14 +1992,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(NodeCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
Node label5140 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeNameEditPartCN.VISUAL_ID));
Node label6066 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6066.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6066 = (Location) label6066.getLayoutConstraint();
+ Location location6066 = (Location)label6066.getLayoutConstraint();
location6066.setX(0);
location6066.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2116,14 +2015,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ClassCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeNameEditPartCN.VISUAL_ID));
Node label6067 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6067.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6067 = (Location) label6067.getLayoutConstraint();
+ Location location6067 = (Location)label6067.getLayoutConstraint();
location6067.setX(0);
location6067.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ClassCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2140,14 +2038,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(CollaborationCompositeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Collaboration");
Node label5141 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPartCN.VISUAL_ID));
Node label6068 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeFloatingLabelEditPartCN.VISUAL_ID));
label6068.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6068 = (Location) label6068.getLayoutConstraint();
+ Location location6068 = (Location)label6068.getLayoutConstraint();
location6068.setX(0);
location6068.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(CollaborationCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -2164,14 +2061,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(InterfaceEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPartCN.VISUAL_ID));
Node label6069 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingLabelEditPartCN.VISUAL_ID));
label6069.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6069 = (Location) label6069.getLayoutConstraint();
+ Location location6069 = (Location)label6069.getLayoutConstraint();
location6069.setX(0);
location6069.setY(5);
return node;
@@ -2186,14 +2082,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(PrimitiveTypeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
Node label6070 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeFloatingLabelEditPartCN.VISUAL_ID));
label6070.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6070 = (Location) label6070.getLayoutConstraint();
+ Location location6070 = (Location)label6070.getLayoutConstraint();
location6070.setX(0);
location6070.setY(5);
return node;
@@ -2208,14 +2103,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(EnumerationEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
Node label6071 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationFloatingLabelEditPartCN.VISUAL_ID));
label6071.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6071 = (Location) label6071.getLayoutConstraint();
+ Location location6071 = (Location)label6071.getLayoutConstraint();
location6071.setX(0);
location6071.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -2232,14 +2126,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DataTypeEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
Node label6072 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeFloatingLabelEditPartCN.VISUAL_ID));
label6072.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6072 = (Location) label6072.getLayoutConstraint();
+ Location location6072 = (Location)label6072.getLayoutConstraint();
location6072.setX(0);
location6072.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -2257,14 +2150,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ActorEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Actor");
Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(ActorNameEditPartCN.VISUAL_ID));
Node label6073 = createLabel(node, UMLVisualIDRegistry.getType(ActorFloatingLabelEditPartCN.VISUAL_ID));
label6073.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6073 = (Location) label6073.getLayoutConstraint();
+ Location location6073 = (Location)label6073.getLayoutConstraint();
location6073.setX(0);
location6073.setY(5);
return node;
@@ -2279,14 +2171,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DeploymentSpecificationEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DeploymentSpecification");
Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPartCN.VISUAL_ID));
Node label6074 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationFloatingLabelEditPartCN.VISUAL_ID));
label6074.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6074 = (Location) label6074.getLayoutConstraint();
+ Location location6074 = (Location)label6074.getLayoutConstraint();
location6074.setX(0);
location6074.setY(5);
return node;
@@ -2301,14 +2192,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ArtifactEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
Node label6075 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactFloatingLabelEditPartCN.VISUAL_ID));
label6075.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6075 = (Location) label6075.getLayoutConstraint();
+ Location location6075 = (Location)label6075.getLayoutConstraint();
location6075.setX(0);
location6075.setY(5);
return node;
@@ -2323,14 +2213,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(InformationItemEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPartCN.VISUAL_ID));
Node label6076 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemFloatingLabelEditPartCN.VISUAL_ID));
label6076.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6076 = (Location) label6076.getLayoutConstraint();
+ Location location6076 = (Location)label6076.getLayoutConstraint();
location6076.setX(0);
location6076.setY(5);
return node;
@@ -2345,14 +2234,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(SignalEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPartCN.VISUAL_ID));
Node label6077 = createLabel(node, UMLVisualIDRegistry.getType(SignalFloatingLabelEditPartCN.VISUAL_ID));
label6077.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6077 = (Location) label6077.getLayoutConstraint();
+ Location location6077 = (Location)label6077.getLayoutConstraint();
location6077.setX(0);
location6077.setY(5);
return node;
@@ -2367,14 +2255,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(UseCaseEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseNameEditPartCN.VISUAL_ID));
Node label6078 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseFloatingLabelEditPartCN.VISUAL_ID));
label6078.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6078 = (Location) label6078.getLayoutConstraint();
+ Location location6078 = (Location)label6078.getLayoutConstraint();
location6078.setX(0);
location6078.setY(5);
return node;
@@ -2389,9 +2276,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
return node;
@@ -2406,9 +2292,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DurationConstraintEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
Node label6040 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintNameEditPartCN.VISUAL_ID));
Node label6041 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2424,9 +2309,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(TimeConstraintEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
Node label6042 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintNameEditPartCN.VISUAL_ID));
Node label6043 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2442,9 +2326,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(IntervalConstraintEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
Node label6044 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintNameEditPartCN.VISUAL_ID));
Node label6045 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2460,9 +2343,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(InteractionConstraintEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionConstraint");
Node label6046 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintNameEditPartCN.VISUAL_ID));
Node label6047 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2478,9 +2360,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label6048 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
Node label6049 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2496,8 +2377,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(PropertyEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
}
@@ -2511,8 +2391,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(OperationEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
}
@@ -2526,8 +2405,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(EnumerationLiteralEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "EnumerationLiteral");
return node;
}
@@ -2548,13 +2426,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(BehaviorPortLinkEditPart.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);
- // }
-
+ 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;
}
@@ -2574,13 +2450,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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);
- // }
-
+ 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;
}
@@ -2600,14 +2474,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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;
}
@@ -2627,14 +2499,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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;
}
@@ -2654,24 +2524,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(ComponentRealizationEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6001 = createLabel(edge, UMLVisualIDRegistry.getType(ComponentRealizationNameEditPart.VISUAL_ID));
label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6001 = (Location) label6001.getLayoutConstraint();
+ Location location6001 = (Location)label6001.getLayoutConstraint();
location6001.setX(0);
location6001.setY(60);
Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID));
label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6015 = (Location) label6015.getLayoutConstraint();
+ Location location6015 = (Location)label6015.getLayoutConstraint();
location6015.setX(0);
location6015.setY(30);
-
return edge;
}
@@ -2691,24 +2559,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6002 = createLabel(edge, UMLVisualIDRegistry.getType(InterfaceRealizationNameEditPart.VISUAL_ID));
label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6002 = (Location) label6002.getLayoutConstraint();
+ Location location6002 = (Location)label6002.getLayoutConstraint();
location6002.setX(0);
location6002.setY(60);
Node label6016 = createLabel(edge, UMLVisualIDRegistry.getType(InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID));
label6016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6016 = (Location) label6016.getLayoutConstraint();
+ Location location6016 = (Location)label6016.getLayoutConstraint();
location6016.setX(0);
location6016.setY(30);
-
return edge;
}
@@ -2728,24 +2594,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(SubstitutionEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6003 = createLabel(edge, UMLVisualIDRegistry.getType(SubstitutionNameEditPart.VISUAL_ID));
label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6003 = (Location) label6003.getLayoutConstraint();
+ Location location6003 = (Location)label6003.getLayoutConstraint();
location6003.setX(0);
location6003.setY(60);
Node label6017 = createLabel(edge, UMLVisualIDRegistry.getType(SubstitutionAppliedStereotypeEditPart.VISUAL_ID));
label6017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6017 = (Location) label6017.getLayoutConstraint();
+ Location location6017 = (Location)label6017.getLayoutConstraint();
location6017.setX(0);
location6017.setY(30);
-
return edge;
}
@@ -2765,24 +2629,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(RealizationEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6004 = createLabel(edge, UMLVisualIDRegistry.getType(RealizationNameEditPart.VISUAL_ID));
label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6004 = (Location) label6004.getLayoutConstraint();
+ Location location6004 = (Location)label6004.getLayoutConstraint();
location6004.setX(0);
location6004.setY(60);
Node label6018 = createLabel(edge, UMLVisualIDRegistry.getType(RealizationAppliedStereotypeEditPart.VISUAL_ID));
label6018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6018 = (Location) label6018.getLayoutConstraint();
+ Location location6018 = (Location)label6018.getLayoutConstraint();
location6018.setX(0);
location6018.setY(30);
-
return edge;
}
@@ -2802,24 +2664,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(ManifestationEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6005 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationNameEditPart.VISUAL_ID));
label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6005 = (Location) label6005.getLayoutConstraint();
+ Location location6005 = (Location)label6005.getLayoutConstraint();
location6005.setX(0);
location6005.setY(60);
Node label6019 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationAppliedStereotypeEditPart.VISUAL_ID));
label6019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6019 = (Location) label6019.getLayoutConstraint();
+ Location location6019 = (Location)label6019.getLayoutConstraint();
location6019.setX(0);
location6019.setY(30);
-
return edge;
}
@@ -2839,24 +2699,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(AbstractionEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6006 = createLabel(edge, UMLVisualIDRegistry.getType(AbstractionNameEditPart.VISUAL_ID));
label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6006 = (Location) label6006.getLayoutConstraint();
+ Location location6006 = (Location)label6006.getLayoutConstraint();
location6006.setX(0);
location6006.setY(60);
Node label6020 = createLabel(edge, UMLVisualIDRegistry.getType(AbstractionAppliedStereotypeEditPart.VISUAL_ID));
label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6020 = (Location) label6020.getLayoutConstraint();
+ Location location6020 = (Location)label6020.getLayoutConstraint();
location6020.setX(0);
location6020.setY(30);
-
return edge;
}
@@ -2876,24 +2734,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6007 = createLabel(edge, UMLVisualIDRegistry.getType(UsageNameEditPart.VISUAL_ID));
label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6007 = (Location) label6007.getLayoutConstraint();
+ Location location6007 = (Location)label6007.getLayoutConstraint();
location6007.setX(0);
location6007.setY(60);
Node label6021 = createLabel(edge, UMLVisualIDRegistry.getType(UsageAppliedStereotypeEditPart.VISUAL_ID));
label6021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6021 = (Location) label6021.getLayoutConstraint();
+ Location location6021 = (Location)label6021.getLayoutConstraint();
location6021.setX(0);
location6021.setY(30);
-
return edge;
}
@@ -2913,24 +2769,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(DeploymentEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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);
- // }
+ //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(DeploymentNameEditPart.VISUAL_ID));
label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6008 = (Location) label6008.getLayoutConstraint();
+ Location location6008 = (Location)label6008.getLayoutConstraint();
location6008.setX(0);
location6008.setY(60);
Node label6022 = createLabel(edge, UMLVisualIDRegistry.getType(DeploymentAppliedStereotypeEditPart.VISUAL_ID));
label6022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6022 = (Location) label6022.getLayoutConstraint();
+ Location location6022 = (Location)label6022.getLayoutConstraint();
location6022.setX(0);
location6022.setY(30);
-
return edge;
}
@@ -2950,24 +2804,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(RoleBindingEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "RoleBinding");
- // 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 label6027 = createLabel(edge, UMLVisualIDRegistry.getType(RoleBindingRoleNameEditPart.VISUAL_ID));
label6027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6027 = (Location) label6027.getLayoutConstraint();
+ Location location6027 = (Location)label6027.getLayoutConstraint();
location6027.setX(0);
location6027.setY(20);
Node label6028 = createLabel(edge, UMLVisualIDRegistry.getType(RoleBindingAppliedStereotypeEditPart.VISUAL_ID));
label6028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6028 = (Location) label6028.getLayoutConstraint();
+ Location location6028 = (Location)label6028.getLayoutConstraint();
location6028.setX(0);
location6028.setY(60);
-
return edge;
}
@@ -2987,24 +2839,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6009 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6009 = (Location) label6009.getLayoutConstraint();
+ Location location6009 = (Location)label6009.getLayoutConstraint();
location6009.setX(0);
location6009.setY(60);
Node label6023 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyAppliedStereotypeEditPart.VISUAL_ID));
label6023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6023 = (Location) label6023.getLayoutConstraint();
+ Location location6023 = (Location)label6023.getLayoutConstraint();
location6023.setX(0);
location6023.setY(60);
-
return edge;
}
@@ -3024,34 +2874,32 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(ConnectorEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6025 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorAppliedStereotypeEditPart.VISUAL_ID));
label6025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6025 = (Location) label6025.getLayoutConstraint();
+ Location location6025 = (Location)label6025.getLayoutConstraint();
location6025.setX(0);
location6025.setY(60);
Node label6050 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorNameEditPart.VISUAL_ID));
label6050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6050 = (Location) label6050.getLayoutConstraint();
+ Location location6050 = (Location)label6050.getLayoutConstraint();
location6050.setX(0);
location6050.setY(-20);
Node label6051 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorMultiplicitySourceEditPart.VISUAL_ID));
label6051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6051 = (Location) label6051.getLayoutConstraint();
+ Location location6051 = (Location)label6051.getLayoutConstraint();
location6051.setX(0);
location6051.setY(20);
Node label6052 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorMultiplicityTargetEditPart.VISUAL_ID));
label6052.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6052 = (Location) label6052.getLayoutConstraint();
+ Location location6052 = (Location)label6052.getLayoutConstraint();
location6052.setX(0);
location6052.setY(20);
-
return edge;
}
@@ -3071,19 +2919,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6024 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
label6024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6024 = (Location) label6024.getLayoutConstraint();
+ Location location6024 = (Location)label6024.getLayoutConstraint();
location6024.setX(0);
location6024.setY(60);
-
return edge;
}
@@ -3103,14 +2949,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(TimeObservationEventEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "TimeObservationEvent");
- // 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;
}
@@ -3130,14 +2974,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(DurationObservationEventEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DurationObservationEvent");
- // 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;
}
@@ -3157,19 +2999,17 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(RepresentationEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.colorToInteger(ColorConstants.black));
- // 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(RepresentationTagLabelEditPart.VISUAL_ID));
label6030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6030 = (Location) label6030.getLayoutConstraint();
+ Location location6030 = (Location)label6030.getLayoutConstraint();
location6030.setX(0);
location6030.setY(15);
-
return edge;
}
@@ -3189,24 +3029,22 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setType(UMLVisualIDRegistry.getType(InformationFlowEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
+ 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 label6031 = createLabel(edge, UMLVisualIDRegistry.getType(InformationFlowConveyedLabelEditPart.VISUAL_ID));
label6031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6031 = (Location) label6031.getLayoutConstraint();
+ Location location6031 = (Location)label6031.getLayoutConstraint();
location6031.setX(0);
location6031.setY(30);
Node label6032 = createLabel(edge, UMLVisualIDRegistry.getType(InformationFlowAppliedStereotypeEditPart.VISUAL_ID));
label6032.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6032 = (Location) label6032.getLayoutConstraint();
+ Location location6032 = (Location)label6032.getLayoutConstraint();
location6032.setX(0);
location6032.setY(15);
-
return edge;
}
@@ -3214,7 +3052,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected void stampShortcut(View containerView, Node target) {
- if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
+ if(!CompositeStructureDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", CompositeStructureDiagramEditPart.MODEL_ID); //$NON-NLS-1$
@@ -3236,26 +3074,24 @@ 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) {
+ if(canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
} else {
rv = NotationFactory.eINSTANCE.createDecorationNode();
}
-
rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
- if (hasTitle) {
+ if(hasTitle) {
TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
rv.getStyles().add(ts);
}
- if (canSort) {
+ if(canSort) {
rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
}
- if (canFilter) {
+ if(canFilter) {
rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
}
rv.setType(hint);
@@ -3267,11 +3103,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected EObject getSemanticElement(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
+ if(semanticAdapter == null) {
return null;
}
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
- if (eObject != null) {
+ EObject eObject = (EObject)semanticAdapter.getAdapter(EObject.class);
+ if(eObject != null) {
return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
}
return null;
@@ -3281,10 +3117,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
+ if(semanticAdapter == null) {
return null;
}
- return (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ return (IElementType)semanticAdapter.getAdapter(IElementType.class);
}
/**
@@ -3293,16 +3129,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT);
String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
-
- FontStyle viewFontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE);
- if (viewFontStyle != null)
- {
+ 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());
}
@@ -3324,24 +3157,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL);
String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT);
String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY);
-
-
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
-
-
- FillStyle fillStyle = (FillStyle) view
- .getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle
- .setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
-
- ;
- if (store.getBoolean(gradientPolicyConstant)) {
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(
- store.getString(gradientColorConstant));
+ 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());
+ fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLPropertySection.java
index 66cdd8e29bd..4ec7a5400bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLPropertySection.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -21,12 +21,11 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
/**
* Modify/unwrap selection.
- *
* @generated
*/
@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.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLSheetLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLSheetLabelProvider.java
index 3f34fedd6e9..3a38ba42304 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLSheetLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/sheet/UMLSheetLabelProvider.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* CEA LIST - Initial API and implementation
*/
@@ -29,7 +29,6 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
/**
* @generated
*/
- @Override
public String getText(Object element) {
element = unwrap(element);
IElementType etype = getElementType(getView(element));
@@ -39,7 +38,6 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
/**
* @generated
*/
- @Override
public Image getImage(Object element) {
IElementType etype = getElementType(getView(unwrap(element)));
return etype == null ? null : UMLElementTypes.getImage(etype);
@@ -49,8 +47,8 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
* @generated
*/
private Object unwrap(Object element) {
- if (element instanceof IStructuredSelection) {
- return ((IStructuredSelection) element).getFirstElement();
+ if(element instanceof IStructuredSelection) {
+ return ((IStructuredSelection)element).getFirstElement();
}
return element;
}
@@ -59,11 +57,11 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
* @generated
*/
private View getView(Object element) {
- if (element instanceof View) {
- return (View) element;
+ if(element instanceof View) {
+ return (View)element;
}
- if (element instanceof IAdaptable) {
- return (View) ((IAdaptable) element).getAdapter(View.class);
+ if(element instanceof IAdaptable) {
+ return (View)((IAdaptable)element).getAdapter(View.class);
}
return null;
}
@@ -73,15 +71,13 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
*/
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) {
+ while(view != null) {
int vid = UMLVisualIDRegistry.getVisualID(view);
- IElementType etype =
- UMLElementTypes.getElementType(vid);
- if (etype != null) {
+ IElementType etype = UMLElementTypes.getElementType(vid);
+ if(etype != null) {
return etype;
}
- view = view.eContainer() instanceof View ?
- (View) view.eContainer() : null;
+ view = view.eContainer() instanceof View ? (View)view.eContainer() : null;
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.classpath b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.classpath
index 2d1a4302f04..46cec6ed2a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.classpath
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..9ca8e68231b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.m2e.core.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 00000000000..f897a7f1cb2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
index 623e0c6790e..4ee3f4fd911 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
@@ -26,7 +26,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0"
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.menu;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/TODO b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/TODO
index 9819887edfc..a42b94a5800 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/TODO
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/TODO
@@ -1,3 +1,2 @@
The main part of this plugin must be moved into org.eclipse.papyrus.infra.gmfdiag.menu
-
The class HandlerStateSourceProvider must be removed and replace by property tester or test in the plugin.xml \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
index 6cb8bff4818..3ca3b20e3a8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
@@ -772,7 +772,8 @@
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
- locationURI="menu:org.eclipse.papyrus.uml.diagram.ui.menu">
+ locationURI="menu:org.eclipse.papyrus.uml.diagram.ui.menu">
+
<command
commandId="org.eclipse.papyrus.uml.diagram.menu.commands.FontCommand"
icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui.actions/icons/elcl16/font_color.gif"
@@ -1823,7 +1824,6 @@
id="org.eclipse.papyrus.uml.diagram.ui.popupmenu.format.alignMenu"
label="Ali&amp;gnment"
tooltip="Alignement Menu">
- mmand>
<command
commandId="org.eclipse.papyrus.uml.diagram.menu.command.alignment.left"
icon="icons/alignleft.gif"
@@ -3663,6 +3663,41 @@
</sourceProvider>
</extension>
<extension
+ id="PapyrusQuickFormatHandler"
+ name="QuickFormatHandler"
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.diagram.menu.actions.handlers.DiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingUpperCaseCommand">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.uml.diagram.menu.quickformatpropertytester.isNameChangeable"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.diagram.menu.actions.handlers.DiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingLowerCaseCommand">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.uml.diagram.menu.quickformatpropertytester.isNameChangeable"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+<extension
id="PapyrusFillColorCommand"
name="FillColorCommand"
point="org.eclipse.ui.commands">
@@ -4474,6 +4509,13 @@
properties="isDiagram,hasRequiredEditPolicy"
type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.uml.diagram.menu.actions.handlers.DiagramNamePropertyTester"
+ id="org.eclipse.papyrus.uml.diagram.menu.quickformatpropertytester"
+ namespace="org.eclipse.papyrus.uml.diagram.menu.quickformatpropertytester"
+ properties="isNameChangeable"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
</extension>
<extension
point="org.eclipse.ui.menus">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/AbstractGraphicalParametricOnSelectedElementsAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/AbstractGraphicalParametricOnSelectedElementsAction.java
new file mode 100644
index 00000000000..d2d81222218
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/AbstractGraphicalParametricOnSelectedElementsAction.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.papyrus.infra.ui.menu.AbstractParametricOnSelectedElementsAction;
+
+
+public abstract class AbstractGraphicalParametricOnSelectedElementsAction extends AbstractParametricOnSelectedElementsAction {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parameter
+ * parameter for the action
+ * @param selectedEditPart
+ * the selectedEditPart for the action
+ */
+ public AbstractGraphicalParametricOnSelectedElementsAction(String parameter, List<EObject> selectedEditPart) {
+ super(parameter, selectedEditPart);
+ }
+
+ /**
+ * Returns the command for this action
+ *
+ * @return
+ * the command for this action
+ */
+ public Command getCommand() {
+ if (isEnabled()) {
+ Command cmd = getBuildedCommand();
+ if (cmd != null && cmd.canExecute()) {
+ return cmd;
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @return
+ * the command for this action
+ */
+ protected abstract Command getBuildedCommand();
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramNameNormalizationCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramNameNormalizationCommand.java
new file mode 100644
index 00000000000..734a163448b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramNameNormalizationCommand.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+
+/**
+ * this command is used to create a link "satisfyBy" between requirement and namedElement
+ *
+ */
+public class DiagramNameNormalizationCommand extends NameNormalizationCommand{
+
+ public DiagramNameNormalizationCommand(TransactionalEditingDomain domain, EObject source, String parameter){
+ super(domain,source, parameter);
+ }
+
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ if(source instanceof Diagram){
+ String name = ((Diagram)source).getName();
+
+ switch (parameter) {
+ case UPPERCASE_ACTION:
+ ((Diagram)source).setName(name.toUpperCase());
+ break;
+ case LOWERCASE_ACTION:
+ ((Diagram)source).setName(name.toLowerCase());
+ break;
+
+ default:
+ ((Diagram)source).setName(name.toUpperCase());
+ break;
+ }
+ }
+
+
+
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramQuickFormatAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramQuickFormatAction.java
new file mode 100644
index 00000000000..d6d99b2ef98
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/DiagramQuickFormatAction.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+
+public class DiagramQuickFormatAction extends AbstractGraphicalParametricOnSelectedElementsAction {
+
+ public DiagramQuickFormatAction(String parameter , List<EObject> selectedElements) {
+ super(parameter, selectedElements);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.menu.actions.AbstractGraphicalParametricAction#getBuildedCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getBuildedCommand() {
+ CompoundCommand cc = new CompoundCommand(NameNormalizationCommand.NAME_ACTION);
+ for(EObject igEP : getSelection()){
+ final TransactionalEditingDomain domain = getEditingDomain();
+ DiagramNameNormalizationCommand myCmd = new DiagramNameNormalizationCommand(domain, igEP, parameter);
+ EMFtoGEFCommandWrapper commandWrapper=new EMFtoGEFCommandWrapper(myCmd);
+ cc.add(commandWrapper);
+ }
+
+
+ if (!cc.isEmpty() && cc.canExecute()) {
+ return cc;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/AbstractGenericCommandHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/AbstractGenericCommandHandler.java
new file mode 100644
index 00000000000..2716d77f80f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/AbstractGenericCommandHandler.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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus (CEA) - bug 433320
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 454891
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions.handlers;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.menu.AbstractCommonCommandHandler;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * This abstract command handler: - calculates the current selection -
+ * calculates the visibility and enablement based on command executability -
+ * executes the command in Papyrus command stack
+ *
+ */
+public abstract class AbstractGenericCommandHandler extends AbstractCommonCommandHandler {
+
+ protected abstract Command getCommand(ExecutionEvent event);
+
+ /**
+ * Iterate over current selection and build a list of the {@link EObject} contained in the selection.
+ *
+ * @return the currently selected {@link EObject}
+ */
+ protected List<EObject> getSelectedElements() {
+ List<EObject> result = new LinkedList<EObject>();
+ for (Object element : getSelection()) {
+ EObject elementi = EMFHelper.getEObject(element) ;
+ if(elementi instanceof Diagram){
+ result.add( elementi);
+ }
+ }
+ return result;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return null
+ * @throws ExecutionException
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ try {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ this.selection = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).toList() : Collections.EMPTY_LIST;
+ getEditingDomain(event).getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(getCommand(event)));
+ } finally {
+ // clear the selection
+ this.selection = Collections.EMPTY_LIST;
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramNamePropertyTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramNamePropertyTester.java
new file mode 100644
index 00000000000..a2c1ccd9a3f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramNamePropertyTester.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions.handlers;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.menu.NamePropertyTester;
+
+
+public class DiagramNamePropertyTester extends NamePropertyTester {
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.menu.NamePropertyTester#isNameChangeable(org.eclipse.jface.viewers.IStructuredSelection)
+ *
+ * @param selection
+ * @return
+ */
+ @Override
+ protected boolean isNameChangeable(IStructuredSelection selection){
+ boolean onlyWaitElement=true;
+ if (!selection.isEmpty()) {
+ Iterator<?> iter = selection.iterator();
+ while (iter.hasNext()) {
+ EObject object = EMFHelper.getEObject(iter.next());
+ if (!(object instanceof Diagram)) {
+ onlyWaitElement =false;
+ break;
+ }
+ }
+ }
+ return onlyWaitElement;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramQuickFormatHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramQuickFormatHandler.java
new file mode 100644
index 00000000000..d99dbb5e878
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/actions/handlers/DiagramQuickFormatHandler.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.menu.actions.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+import org.eclipse.papyrus.infra.ui.menu.NamePropertyTester;
+import org.eclipse.papyrus.uml.diagram.menu.actions.DiagramQuickFormatAction;
+
+/**
+ * The handler for the {@link DiagramQuickFormatAction}
+ *
+ *
+ *
+ */
+public class DiagramQuickFormatHandler extends AbstractGenericCommandHandler {
+
+ /**
+ *
+ * Constructor.
+ */
+ public DiagramQuickFormatHandler() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.menu.handlers.AbstractGraphicalCommandHandler#getCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getCommand(ExecutionEvent event) {
+ String parameter = event.getParameter(NamePropertyTester.PARAMETER_ID);
+
+ DiagramQuickFormatAction action = new DiagramQuickFormatAction(parameter,getSelectedElements());
+ setBaseEnabled(action.isEnabled());
+ if (action.isEnabled()) {
+ return action.getCommand();
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ DiagramQuickFormatAction action = new DiagramQuickFormatAction(NameNormalizationCommand.DEFAULT_ACTION, getSelectedElements());
+ setBaseEnabled(action.isEnabled());
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/DiagramPropertyTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/DiagramPropertyTester.java
index ac5e378cac8..f95e5ece95b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/DiagramPropertyTester.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/DiagramPropertyTester.java
@@ -14,10 +14,12 @@ package org.eclipse.papyrus.uml.diagram.menu.providers;
import java.util.Iterator;
import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
@@ -81,7 +83,8 @@ public class DiagramPropertyTester extends PropertyTester {
if (!selection.isEmpty()) {
Iterator<?> iter = selection.iterator();
while (iter.hasNext()) {
- if (!(iter.next() instanceof Diagram)) {
+ EObject object = EMFHelper.getEObject(iter.next());
+ if (!(object instanceof Diagram)) {
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
index d3ff66c8302..b7fb4b25bfa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
@@ -11,18 +11,15 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.uml2.uml,
org.eclipse.uml2.uml.edit,
org.eclipse.papyrus.emf.facet.efacet.metamodel.edit;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration.p
- rovider
+Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration
- .provider.PaletteConfigurationEditPlugin$Implementation
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteConfigurationEditPlugin$Implementation
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfigurat
- ion.edit;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java
index 97fc84acecc..00392419058 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,23 +18,22 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
/**
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class ChildConfigurationItemProvider
- extends ConfigurationItemProvider {
+public class ChildConfigurationItemProvider extends ConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ChildConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -35,7 +44,6 @@ public class ChildConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,24 +59,22 @@ public class ChildConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((ChildConfiguration) object).getId();
+ String label = ((ChildConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_ChildConfiguration_type") :
- getString("_UI_ChildConfiguration_type") + " " + label;
+ getString("_UI_ChildConfiguration_type") :
+ getString("_UI_ChildConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -82,7 +88,6 @@ public class ChildConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java
index d8c49434d0a..c1ab1a626c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,8 +18,11 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -20,6 +33,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -28,12 +42,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class ConfigurationItemProvider
- extends ItemProviderAdapter
- implements
+public class ConfigurationItemProvider
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -43,7 +56,6 @@ public class ConfigurationItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -54,7 +66,6 @@ public class ConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -73,77 +84,74 @@ public class ConfigurationItemProvider
* This adds a property descriptor for the Id feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Configuration_id_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Configuration_id_feature", "_UI_Configuration_type"),
- PaletteconfigurationPackage.Literals.CONFIGURATION__ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Configuration_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Configuration_id_feature", "_UI_Configuration_type"),
+ PaletteconfigurationPackage.Literals.CONFIGURATION__ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Label feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addLabelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Configuration_label_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Configuration_label_feature", "_UI_Configuration_type"),
- PaletteconfigurationPackage.Literals.CONFIGURATION__LABEL,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Configuration_label_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Configuration_label_feature", "_UI_Configuration_type"),
+ PaletteconfigurationPackage.Literals.CONFIGURATION__LABEL,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Description feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Configuration_description_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Configuration_description_feature", "_UI_Configuration_type"),
- PaletteconfigurationPackage.Literals.CONFIGURATION__DESCRIPTION,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Configuration_description_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Configuration_description_feature", "_UI_Configuration_type"),
+ PaletteconfigurationPackage.Literals.CONFIGURATION__DESCRIPTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -158,7 +166,6 @@ public class ConfigurationItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -173,24 +180,22 @@ public class ConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((Configuration) object).getId();
+ String label = ((Configuration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_Configuration_type") :
- getString("_UI_Configuration_type") + " " + label;
+ getString("_UI_Configuration_type") :
+ getString("_UI_Configuration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -198,14 +203,14 @@ public class ConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Configuration.class)) {
- case PaletteconfigurationPackage.CONFIGURATION__ID:
- case PaletteconfigurationPackage.CONFIGURATION__LABEL:
- case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case PaletteconfigurationPackage.CONFIGURATION__ID:
+ case PaletteconfigurationPackage.CONFIGURATION__LABEL:
+ case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -215,7 +220,6 @@ public class ConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -223,16 +227,15 @@ public class ConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.CONFIGURATION__ICON,
- PaletteconfigurationFactory.eINSTANCE.createIconDescriptor()));
+ PaletteconfigurationFactory.eINSTANCE.createIconDescriptor()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java
index 407ca51c826..c8cb6b24ec4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,9 +18,12 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -19,16 +32,13 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class DrawerConfigurationItemProvider
- extends ConfigurationItemProvider {
+public class DrawerConfigurationItemProvider extends ConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DrawerConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -39,7 +49,6 @@ public class DrawerConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,11 +61,11 @@ public class DrawerConfigurationItemProvider
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -71,7 +80,6 @@ public class DrawerConfigurationItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -86,7 +94,6 @@ public class DrawerConfigurationItemProvider
* This returns DrawerConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -98,24 +105,22 @@ public class DrawerConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((DrawerConfiguration) object).getId();
+ String label = ((DrawerConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_DrawerConfiguration_type") :
- getString("_UI_DrawerConfiguration_type") + " " + label;
+ getString("_UI_DrawerConfiguration_type") :
+ getString("_UI_DrawerConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -123,9 +128,9 @@ public class DrawerConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(DrawerConfiguration.class)) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -135,7 +140,6 @@ public class DrawerConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -143,19 +147,19 @@ public class DrawerConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createToolConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createToolConfiguration()));
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createStackConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createStackConfiguration()));
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java
index 8567d7fa0d5..f6e6caf1bec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,7 +18,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -19,6 +31,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -26,12 +39,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class ElementDescriptorItemProvider
- extends ItemProviderAdapter
- implements
+public class ElementDescriptorItemProvider
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -41,7 +53,6 @@ public class ElementDescriptorItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ElementDescriptorItemProvider(AdapterFactory adapterFactory) {
@@ -52,7 +63,6 @@ public class ElementDescriptorItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -70,53 +80,50 @@ public class ElementDescriptorItemProvider
* This adds a property descriptor for the Element Type Id feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addElementTypeIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ElementDescriptor_elementTypeId_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_elementTypeId_feature", "_UI_ElementDescriptor_type"),
- PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ElementDescriptor_elementTypeId_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_elementTypeId_feature", "_UI_ElementDescriptor_type"),
+ PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Graphical Hints feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addGraphicalHintsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ElementDescriptor_graphicalHints_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_graphicalHints_feature", "_UI_ElementDescriptor_type"),
- PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ElementDescriptor_graphicalHints_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_graphicalHints_feature", "_UI_ElementDescriptor_type"),
+ PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This returns ElementDescriptor.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -128,24 +135,22 @@ public class ElementDescriptorItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((ElementDescriptor) object).getElementTypeId();
+ String label = ((ElementDescriptor)object).getElementTypeId();
return label == null || label.length() == 0 ?
- getString("_UI_ElementDescriptor_type") :
- getString("_UI_ElementDescriptor_type") + " " + label;
+ getString("_UI_ElementDescriptor_type") :
+ getString("_UI_ElementDescriptor_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -153,10 +158,10 @@ public class ElementDescriptorItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ElementDescriptor.class)) {
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -166,7 +171,6 @@ public class ElementDescriptorItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -178,7 +182,6 @@ public class ElementDescriptorItemProvider
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java
index f3af783bbca..bf73012f9c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,7 +18,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -19,6 +31,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -26,12 +39,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class IconDescriptorItemProvider
- extends ItemProviderAdapter
- implements
+public class IconDescriptorItemProvider
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -41,7 +53,6 @@ public class IconDescriptorItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public IconDescriptorItemProvider(AdapterFactory adapterFactory) {
@@ -52,7 +63,6 @@ public class IconDescriptorItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -70,53 +80,50 @@ public class IconDescriptorItemProvider
* This adds a property descriptor for the Plugin ID feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addPluginIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_IconDescriptor_pluginID_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_pluginID_feature", "_UI_IconDescriptor_type"),
- PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__PLUGIN_ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IconDescriptor_pluginID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_pluginID_feature", "_UI_IconDescriptor_type"),
+ PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__PLUGIN_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Icon Path feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addIconPathPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_IconDescriptor_iconPath_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_iconPath_feature", "_UI_IconDescriptor_type"),
- PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__ICON_PATH,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IconDescriptor_iconPath_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_iconPath_feature", "_UI_IconDescriptor_type"),
+ PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__ICON_PATH,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This returns IconDescriptor.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -128,24 +135,22 @@ public class IconDescriptorItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((IconDescriptor) object).getPluginID();
+ String label = ((IconDescriptor)object).getPluginID();
return label == null || label.length() == 0 ?
- getString("_UI_IconDescriptor_type") :
- getString("_UI_IconDescriptor_type") + " " + label;
+ getString("_UI_IconDescriptor_type") :
+ getString("_UI_IconDescriptor_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -153,10 +158,10 @@ public class IconDescriptorItemProvider
updateChildren(notification);
switch (notification.getFeatureID(IconDescriptor.class)) {
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -166,7 +171,6 @@ public class IconDescriptorItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -178,7 +182,6 @@ public class IconDescriptorItemProvider
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java
index 2b2d3e42bc2..3e29e137d63 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,23 +18,22 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
/**
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class LeafConfigurationItemProvider
- extends ChildConfigurationItemProvider {
+public class LeafConfigurationItemProvider extends ChildConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public LeafConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -35,7 +44,6 @@ public class LeafConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,24 +59,22 @@ public class LeafConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((LeafConfiguration) object).getId();
+ String label = ((LeafConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_LeafConfiguration_type") :
- getString("_UI_LeafConfiguration_type") + " " + label;
+ getString("_UI_LeafConfiguration_type") :
+ getString("_UI_LeafConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -82,7 +88,6 @@ public class LeafConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
index 48d9c3c1009..085503bb05b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
@@ -1,16 +1,27 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import org.eclipse.emf.common.EMFPlugin;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
/**
* This is the central singleton for the PaletteConfiguration edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public final class PaletteConfigurationEditPlugin extends EMFPlugin {
@@ -18,7 +29,6 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static final PaletteConfigurationEditPlugin INSTANCE = new PaletteConfigurationEditPlugin();
@@ -27,7 +37,6 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private static Implementation plugin;
@@ -36,20 +45,19 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteConfigurationEditPlugin() {
- super(new ResourceLocator[] {
- EcoreEditPlugin.INSTANCE,
- });
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ });
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the singleton instance.
* @generated
*/
@@ -62,7 +70,6 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the singleton instance.
* @generated
*/
@@ -74,7 +81,6 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static class Implementation extends EclipsePlugin {
@@ -82,7 +88,6 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public Implementation() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java
index db0d5788c7d..519bacfca72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,11 +18,14 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -21,16 +34,13 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class PaletteConfigurationItemProvider
- extends ConfigurationItemProvider {
+public class PaletteConfigurationItemProvider extends ConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -41,7 +51,6 @@ public class PaletteConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -58,31 +67,30 @@ public class PaletteConfigurationItemProvider
* This adds a property descriptor for the Required Profiles feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addRequiredProfilesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PaletteConfiguration_requiredProfiles_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PaletteConfiguration_requiredProfiles_feature", "_UI_PaletteConfiguration_type"),
- PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__REQUIRED_PROFILES,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PaletteConfiguration_requiredProfiles_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PaletteConfiguration_requiredProfiles_feature", "_UI_PaletteConfiguration_type"),
+ PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__REQUIRED_PROFILES,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -97,7 +105,6 @@ public class PaletteConfigurationItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -112,7 +119,6 @@ public class PaletteConfigurationItemProvider
* This returns PaletteConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -124,24 +130,22 @@ public class PaletteConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((PaletteConfiguration) object).getId();
+ String label = ((PaletteConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_PaletteConfiguration_type") :
- getString("_UI_PaletteConfiguration_type") + " " + label;
+ getString("_UI_PaletteConfiguration_type") :
+ getString("_UI_PaletteConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -149,12 +153,12 @@ public class PaletteConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PaletteConfiguration.class)) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -164,7 +168,6 @@ public class PaletteConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -172,9 +175,9 @@ public class PaletteConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createDrawerConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createDrawerConfiguration()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java
index 4f8732ae836..64a7bbc8956 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,6 +18,7 @@ import java.util.Collection;
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.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
@@ -19,6 +30,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationAdapterFactory;
/**
@@ -28,7 +40,6 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.Paletteconfigur
* Note that most of the adapters are shared among multiple instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public class PaletteconfigurationItemProviderAdapterFactory extends PaletteconfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
@@ -36,7 +47,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ComposedAdapterFactory parentAdapterFactory;
@@ -45,7 +55,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected IChangeNotifier changeNotifier = new ChangeNotifier();
@@ -54,7 +63,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected Collection<Object> supportedTypes = new ArrayList<Object>();
@@ -63,7 +71,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This constructs an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationItemProviderAdapterFactory() {
@@ -78,7 +85,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected PaletteConfigurationItemProvider paletteConfigurationItemProvider;
@@ -87,7 +93,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -103,7 +108,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ToolConfigurationItemProvider toolConfigurationItemProvider;
@@ -112,7 +116,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -128,7 +131,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected StackConfigurationItemProvider stackConfigurationItemProvider;
@@ -137,7 +139,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -153,7 +154,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected DrawerConfigurationItemProvider drawerConfigurationItemProvider;
@@ -162,7 +162,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -178,7 +177,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected IconDescriptorItemProvider iconDescriptorItemProvider;
@@ -187,7 +185,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -203,7 +200,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ElementDescriptorItemProvider elementDescriptorItemProvider;
@@ -212,7 +208,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -228,7 +223,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected SeparatorConfigurationItemProvider separatorConfigurationItemProvider;
@@ -237,7 +231,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -253,10 +246,8 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
@@ -265,10 +256,8 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This sets the composed adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
@@ -276,7 +265,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -288,7 +276,6 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -299,14 +286,13 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
return adapter;
}
}
@@ -318,10 +304,8 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This adds a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
@@ -330,10 +314,8 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
@@ -342,10 +324,8 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
@@ -355,35 +335,19 @@ public class PaletteconfigurationItemProviderAdapterFactory extends Paletteconfi
}
/**
- * This disposes all of the item providers created by this factory.
+ * This disposes all of the item providers created by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void dispose() {
- if (paletteConfigurationItemProvider != null) {
- paletteConfigurationItemProvider.dispose();
- }
- if (toolConfigurationItemProvider != null) {
- toolConfigurationItemProvider.dispose();
- }
- if (stackConfigurationItemProvider != null) {
- stackConfigurationItemProvider.dispose();
- }
- if (drawerConfigurationItemProvider != null) {
- drawerConfigurationItemProvider.dispose();
- }
- if (iconDescriptorItemProvider != null) {
- iconDescriptorItemProvider.dispose();
- }
- if (elementDescriptorItemProvider != null) {
- elementDescriptorItemProvider.dispose();
- }
- if (separatorConfigurationItemProvider != null) {
- separatorConfigurationItemProvider.dispose();
- }
+ if (paletteConfigurationItemProvider != null) paletteConfigurationItemProvider.dispose();
+ if (toolConfigurationItemProvider != null) toolConfigurationItemProvider.dispose();
+ if (stackConfigurationItemProvider != null) stackConfigurationItemProvider.dispose();
+ if (drawerConfigurationItemProvider != null) drawerConfigurationItemProvider.dispose();
+ if (iconDescriptorItemProvider != null) iconDescriptorItemProvider.dispose();
+ if (elementDescriptorItemProvider != null) elementDescriptorItemProvider.dispose();
+ if (separatorConfigurationItemProvider != null) separatorConfigurationItemProvider.dispose();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java
index d28bd296c09..c1904b0e833 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,23 +18,22 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
/**
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class SeparatorConfigurationItemProvider
- extends LeafConfigurationItemProvider {
+public class SeparatorConfigurationItemProvider extends LeafConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public SeparatorConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -35,7 +44,6 @@ public class SeparatorConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,7 +59,6 @@ public class SeparatorConfigurationItemProvider
* This returns SeparatorConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -63,24 +70,22 @@ public class SeparatorConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((SeparatorConfiguration) object).getId();
+ String label = ((SeparatorConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_SeparatorConfiguration_type") :
- getString("_UI_SeparatorConfiguration_type") + " " + label;
+ getString("_UI_SeparatorConfiguration_type") :
+ getString("_UI_SeparatorConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -94,7 +99,6 @@ public class SeparatorConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java
index e5faad001ba..4e65f4205b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,9 +18,12 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
@@ -19,16 +32,13 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class StackConfigurationItemProvider
- extends ChildConfigurationItemProvider {
+public class StackConfigurationItemProvider extends ChildConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public StackConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -39,7 +49,6 @@ public class StackConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,11 +61,11 @@ public class StackConfigurationItemProvider
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -71,7 +80,6 @@ public class StackConfigurationItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -86,7 +94,6 @@ public class StackConfigurationItemProvider
* This returns StackConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -98,24 +105,22 @@ public class StackConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((StackConfiguration) object).getId();
+ String label = ((StackConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_StackConfiguration_type") :
- getString("_UI_StackConfiguration_type") + " " + label;
+ getString("_UI_StackConfiguration_type") :
+ getString("_UI_StackConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -123,9 +128,9 @@ public class StackConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(StackConfiguration.class)) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -135,7 +140,6 @@ public class StackConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -143,14 +147,14 @@ public class StackConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createToolConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createToolConfiguration()));
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS,
- PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration()));
+ PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java
index 60aa42bff57..d7c3a5c25a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java
@@ -1,4 +1,14 @@
/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
@@ -8,11 +18,14 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
@@ -21,16 +34,13 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
* This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
-public class ToolConfigurationItemProvider
- extends LeafConfigurationItemProvider {
+public class ToolConfigurationItemProvider extends LeafConfigurationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ToolConfigurationItemProvider(AdapterFactory adapterFactory) {
@@ -41,7 +51,6 @@ public class ToolConfigurationItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -58,31 +67,30 @@ public class ToolConfigurationItemProvider
* This adds a property descriptor for the Kind feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected void addKindPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ToolConfiguration_kind_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_kind_feature", "_UI_ToolConfiguration_type"),
- PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__KIND,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ToolConfiguration_kind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_kind_feature", "_UI_ToolConfiguration_type"),
+ PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__KIND,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -97,7 +105,6 @@ public class ToolConfigurationItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -112,7 +119,6 @@ public class ToolConfigurationItemProvider
* This returns ToolConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -124,24 +130,22 @@ public class ToolConfigurationItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((ToolConfiguration) object).getId();
+ String label = ((ToolConfiguration)object).getId();
return label == null || label.length() == 0 ?
- getString("_UI_ToolConfiguration_type") :
- getString("_UI_ToolConfiguration_type") + " " + label;
+ getString("_UI_ToolConfiguration_type") :
+ getString("_UI_ToolConfiguration_type") + " " + label;
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -149,12 +153,12 @@ public class ToolConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ToolConfiguration.class)) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -164,7 +168,6 @@ public class ToolConfigurationItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -172,9 +175,9 @@ public class ToolConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS,
- PaletteconfigurationFactory.eINSTANCE.createElementDescriptor()));
+ PaletteconfigurationFactory.eINSTANCE.createElementDescriptor()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF
index 2ab578698a0..d3f2d5418fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF
@@ -23,10 +23,8 @@ Bundle-ClassPath: .
Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration
- .Activator
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.Activator
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfigurat
- ion;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore_diagram b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore_diagram
new file mode 100644
index 00000000000..1ab0379a414
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore_diagram
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_vUZYQLkAEeSblPRuyGO0dw" type="Ecore" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8SRwUL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8SWBwL2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sa6QL2oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SbhUL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SbhUb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SbhUr2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SbhU72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SbhVL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SbhVb2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SbhVr2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SbhV72oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//PaletteConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8SRwUb2oEeSA8oxr--Q4Aw" x="100" y="290"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8ScvcL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8Scvcr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Scvc72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8ScvdL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Scvdb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SdWgL2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SdWgb2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SdWgr2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SdWg72oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SdWhL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SdWhb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ToolConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8Scvcb2oEeSA8oxr--Q4Aw" x="645" y="545"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8Sd9kL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8Sd9kr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sd9k72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sd9lL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sd9lb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sd9lr2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sd9l72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sd9mL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SekoL2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sekob2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sekor2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//StackConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8Sd9kb2oEeSA8oxr--Q4Aw" x="490" y="440"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SfywL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8Sfywr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SgZ0L2oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SgZ0b2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SgZ0r2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SgZ072oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SgZ1L2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SgZ1b2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SgZ1r2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SgZ172oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SgZ2L2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ChildConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8Sfywb2oEeSA8oxr--Q4Aw" x="620" y="290"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8ShA4L2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8ShA4r2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8ShA472oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Shn8L2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Shn8b2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Shn8r2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Shn872oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Shn9L2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Shn9b2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Shn9r2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Shn972oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//DrawerConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8ShA4b2oEeSA8oxr--Q4Aw" x="330" y="290"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SiPAL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8SiPAr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SiPA72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SiPBL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SiPBb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SiPBr2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Si2EL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Si2Eb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Si2Er2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Si2E72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Si2FL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//Configuration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8SiPAb2oEeSA8oxr--Q4Aw" x="615" y="110"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SjdIL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8SjdIr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SjdI72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SjdJL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SjdJb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SjdJr2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SjdJ72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SjdKL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SjdKb2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SjdKr2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SjdK72oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//IconDescriptor"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8SjdIb2oEeSA8oxr--Q4Aw" x="140" y="85"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SkrQL2oEeSA8oxr--Q4Aw" type="2005" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8SkrQr2oEeSA8oxr--Q4Aw" type="5005"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SkrQ72oEeSA8oxr--Q4Aw" type="7011">
+ <children xmi:type="notation:Node" xmi:id="_8ZYd4L2oEeSA8oxr--Q4Aw" type="3009">
+ <element xmi:type="ecore:EEnumLiteral" href="PaletteConfiguration.ecore#//ToolKind/CreationTool"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8ZYd4b2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8ZZE8L2oEeSA8oxr--Q4Aw" type="3009">
+ <element xmi:type="ecore:EEnumLiteral" href="PaletteConfiguration.ecore#//ToolKind/ConnectionTool"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8ZZE8b2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SkrRL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SkrRb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SkrRr2oEeSA8oxr--Q4Aw" type="7012">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SkrR72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SkrSL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EEnum" href="PaletteConfiguration.ecore#//ToolKind"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8SkrQb2oEeSA8oxr--Q4Aw" x="435" y="630"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SlSUL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8SlSUr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sl5YL2oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sl5Yb2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sl5Yr2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sl5Y72oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sl5ZL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sl5Zb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Sl5Zr2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Sl5Z72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Sl5aL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ElementDescriptor"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8SlSUb2oEeSA8oxr--Q4Aw" x="425" y="530"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SmgcL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8Smgcr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Smgc72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SmgdL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SnHgL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SnHgb2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SnHgr2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SnHg72oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8SnHhL2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SnHhb2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SnHhr2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//SeparatorConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8Smgcb2oEeSA8oxr--Q4Aw" x="815" y="550"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8SnukL2oEeSA8oxr--Q4Aw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8Snukr2oEeSA8oxr--Q4Aw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Snuk72oEeSA8oxr--Q4Aw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8SnulL2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Snulb2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Snulr2oEeSA8oxr--Q4Aw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Snul72oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8SnumL2oEeSA8oxr--Q4Aw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8Snumb2oEeSA8oxr--Q4Aw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8Snumr2oEeSA8oxr--Q4Aw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8Snum72oEeSA8oxr--Q4Aw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//LeafConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8Snukb2oEeSA8oxr--Q4Aw" x="710" y="440"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Bhbq0L5vEeS4RsarI-F0Lw" type="2001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Bhbq0r5vEeS4RsarI-F0Lw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BhcR4L5vEeS4RsarI-F0Lw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BhcR4b5vEeS4RsarI-F0Lw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BhcR4r5vEeS4RsarI-F0Lw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BhcR475vEeS4RsarI-F0Lw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BhcR5L5vEeS4RsarI-F0Lw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BhcR5b5vEeS4RsarI-F0Lw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BhcR5r5vEeS4RsarI-F0Lw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BhcR575vEeS4RsarI-F0Lw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BhcR6L5vEeS4RsarI-F0Lw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//SetToolConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Bhbq0b5vEeS4RsarI-F0Lw" x="630" y="635"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_vUZYQbkAEeSblPRuyGO0dw"/>
+ <element xmi:type="ecore:EPackage" href="PaletteConfiguration.ecore#/"/>
+ <edges xmi:type="notation:Connector" xmi:id="_KQ7goL5mEeS4RsarI-F0Lw" type="4003" source="_8SRwUL2oEeSA8oxr--Q4Aw" target="_8ShA4L2oEeSA8oxr--Q4Aw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KQ8HsL5mEeS4RsarI-F0Lw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KQ8uwL5mEeS4RsarI-F0Lw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KQ8uwb5mEeS4RsarI-F0Lw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KQ8uwr5mEeS4RsarI-F0Lw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KQ7gob5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//PaletteConfiguration/drawerConfigurations"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KQ7gor5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KRxOIL5mEeS4RsarI-F0Lw" type="4004" source="_8SRwUL2oEeSA8oxr--Q4Aw" target="_8SiPAL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KRxOIb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KRxOIr5mEeS4RsarI-F0Lw" points="[37, 30, -326, -261]$[306, 246, -57, -45]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSPIML5mEeS4RsarI-F0Lw" type="4003" source="_8ScvcL2oEeSA8oxr--Q4Aw" target="_8SlSUL2oEeSA8oxr--Q4Aw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSPvQL5mEeS4RsarI-F0Lw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSPvQb5mEeS4RsarI-F0Lw" x="10" y="71"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSPvQr5mEeS4RsarI-F0Lw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSPvQ75mEeS4RsarI-F0Lw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSPIMb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//ToolConfiguration/elementDescriptors"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSPIMr5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSV14L5mEeS4RsarI-F0Lw" type="4004" source="_8ScvcL2oEeSA8oxr--Q4Aw" target="_8SnukL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSV14b5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSV14r5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSY5ML5mEeS4RsarI-F0Lw" type="4003" source="_8Sd9kL2oEeSA8oxr--Q4Aw" target="_8SnukL2oEeSA8oxr--Q4Aw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSY5M75mEeS4RsarI-F0Lw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSY5NL5mEeS4RsarI-F0Lw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSY5Nb5mEeS4RsarI-F0Lw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSY5Nr5mEeS4RsarI-F0Lw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSY5Mb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//StackConfiguration/ownedConfigurations"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSY5Mr5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSdKoL5mEeS4RsarI-F0Lw" type="4004" source="_8Sd9kL2oEeSA8oxr--Q4Aw" target="_8SfywL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSdKob5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSdKor5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSgN8L5mEeS4RsarI-F0Lw" type="4004" source="_8SfywL2oEeSA8oxr--Q4Aw" target="_8SiPAL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSgN8b5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSgN8r5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSiqML5mEeS4RsarI-F0Lw" type="4003" source="_8ShA4L2oEeSA8oxr--Q4Aw" target="_8SfywL2oEeSA8oxr--Q4Aw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSjRQr5mEeS4RsarI-F0Lw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSjRQ75mEeS4RsarI-F0Lw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSjRRL5mEeS4RsarI-F0Lw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSjRRb5mEeS4RsarI-F0Lw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSjRQL5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//DrawerConfiguration/ownedConfigurations"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSjRQb5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSnisL5mEeS4RsarI-F0Lw" type="4004" source="_8ShA4L2oEeSA8oxr--Q4Aw" target="_8SiPAL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSnisb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSnisr5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSqmAL5mEeS4RsarI-F0Lw" type="4003" source="_8SiPAL2oEeSA8oxr--Q4Aw" target="_8SjdIL2oEeSA8oxr--Q4Aw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSrNEL5mEeS4RsarI-F0Lw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSrNEb5mEeS4RsarI-F0Lw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KSrNEr5mEeS4RsarI-F0Lw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KSrNE75mEeS4RsarI-F0Lw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSqmAb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//Configuration/icon"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSqmAr5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSvegL5mEeS4RsarI-F0Lw" type="4004" source="_8SmgcL2oEeSA8oxr--Q4Aw" target="_8SnukL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSvegb5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSvegr5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KSyh0L5mEeS4RsarI-F0Lw" type="4004" source="_8SnukL2oEeSA8oxr--Q4Aw" target="_8SfywL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KSyh0b5mEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KSyh0r5mEeS4RsarI-F0Lw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Sdb48L5vEeS4RsarI-F0Lw" type="4004" source="_Bhbq0L5vEeS4RsarI-F0Lw" target="_8ScvcL2oEeSA8oxr--Q4Aw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Sdb48b5vEeS4RsarI-F0Lw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Sdb48r5vEeS4RsarI-F0Lw" points="[2, -26, 1, 61]$[2, -116, 1, -29]"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag
deleted file mode 100644
index 62f9a357eb7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_quPlkN3cEd-vY7OSNoF8nA" type="EcoreTools" name="PaletteConfiguration" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_Es6HAN3dEd-vY7OSNoF8nA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_Es6HA93dEd-vY7OSNoF8nA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_Es6HBN3dEd-vY7OSNoF8nA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_8nEWwMSxEeO-K5aODM_IgQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//PaletteConfiguration/requiredProfiles"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_8nEWwcSxEeO-K5aODM_IgQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Es6HBd3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Es6HBt3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Es6HB93dEd-vY7OSNoF8nA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Es6HCN3dEd-vY7OSNoF8nA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Es6HCd3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Es6HCt3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Es6HC93dEd-vY7OSNoF8nA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_Es6HAd3dEd-vY7OSNoF8nA" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//PaletteConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Es6HAt3dEd-vY7OSNoF8nA" x="15" y="240" width="233" height="68"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_FwHQcN3dEd-vY7OSNoF8nA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_FwHQc93dEd-vY7OSNoF8nA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_FwHQdN3dEd-vY7OSNoF8nA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_ufg5ISAGEeCy0IHGPAm6kg" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//ToolConfiguration/kind"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ufg5IiAGEeCy0IHGPAm6kg"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_FwHQdd3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_FwHQdt3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_FwHQd93dEd-vY7OSNoF8nA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_FwHQeN3dEd-vY7OSNoF8nA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_FwHQed3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_FwHQet3dEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_FwHQe93dEd-vY7OSNoF8nA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_FwHQcd3dEd-vY7OSNoF8nA" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ToolConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FwHQct3dEd-vY7OSNoF8nA" x="800" y="490" width="173" height="163"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_tJSakOAfEd-0CYOJPs0ewQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_tJSak-AfEd-0CYOJPs0ewQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_tJSalOAfEd-0CYOJPs0ewQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_tJSaleAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tJSaluAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tJSal-AfEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_tJSamOAfEd-0CYOJPs0ewQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_tJSameAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tJSamuAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tJSam-AfEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_tJSakeAfEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//StackConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tJSakuAfEd-0CYOJPs0ewQ" x="465" y="365" width="173" height="88"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_50zD4OAfEd-0CYOJPs0ewQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_50zD4-AfEd-0CYOJPs0ewQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_50zD5OAfEd-0CYOJPs0ewQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_50zD5eAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_50zD5uAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_50zD5-AfEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_50zD6OAfEd-0CYOJPs0ewQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_50zD6eAfEd-0CYOJPs0ewQ" collapsed="true"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_50zD6uAfEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_50zD6-AfEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_50zD4eAfEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ChildConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_50zD4uAfEd-0CYOJPs0ewQ" x="650" y="235" width="198" height="68"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Vqk38OAgEd-0CYOJPs0ewQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_Vqk38-AgEd-0CYOJPs0ewQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_Vqk39OAgEd-0CYOJPs0ewQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Vqk39eAgEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Vqk39uAgEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Vqk39-AgEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Vqk3-OAgEd-0CYOJPs0ewQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Vqk3-eAgEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Vqk3-uAgEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Vqk3--AgEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_Vqk38eAgEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//DrawerConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vqk38uAgEd-0CYOJPs0ewQ" x="310" y="240" width="228" height="68"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_KBEQwOEpEd-0CYOJPs0ewQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_KBEQw-EpEd-0CYOJPs0ewQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_KBEQxOEpEd-0CYOJPs0ewQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_iti2wOEXEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//Configuration/id"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_iti2weEXEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ko6-UOEXEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//Configuration/label"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ko6-UeEXEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_wkqg4OHCEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//Configuration/description"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_wkqg4eHCEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_KBEQxeEpEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_KBEQxuEpEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_KBEQx-EpEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_KBEQyOEpEd-0CYOJPs0ewQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_KBEQyeEpEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_KBEQyuEpEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_KBEQy-EpEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_KBEQweEpEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//Configuration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KBEQwuEpEd-0CYOJPs0ewQ" x="390" y="15" width="188" height="83"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_x9n34OHCEd-0CYOJPs0ewQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_x9n34-HCEd-0CYOJPs0ewQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_x9n35OHCEd-0CYOJPs0ewQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_zItyAOHCEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//IconDescriptor/pluginID"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_zItyAeHCEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_1_ZrQOHCEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//IconDescriptor/iconPath"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_1_ZrQeHCEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_x9n35eHCEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_x9n35uHCEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_x9n35-HCEd-0CYOJPs0ewQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_x9n36OHCEd-0CYOJPs0ewQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_x9n36eHCEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_x9n36uHCEd-0CYOJPs0ewQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_x9n36-HCEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_x9n34eHCEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//IconDescriptor"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_x9n34uHCEd-0CYOJPs0ewQ" x="710" y="25"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vcdpkCAGEeCy0IHGPAm6kg" type="1005">
- <children xmi:type="notation:Node" xmi:id="_vcdpkyAGEeCy0IHGPAm6kg" type="4010"/>
- <children xmi:type="notation:Node" xmi:id="_vcnakCAGEeCy0IHGPAm6kg" type="5008">
- <children xmi:type="notation:Node" xmi:id="_xYSdECAGEeCy0IHGPAm6kg" type="2006">
- <element xmi:type="ecore:EEnumLiteral" href="PaletteConfiguration.ecore#//ToolKind/ConnectionTool"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xYSdESAGEeCy0IHGPAm6kg"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_wjPrcCAGEeCy0IHGPAm6kg" type="2006">
- <element xmi:type="ecore:EEnumLiteral" href="PaletteConfiguration.ecore#//ToolKind/CreationTool"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_wjPrcSAGEeCy0IHGPAm6kg"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_vcnakSAGEeCy0IHGPAm6kg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_vcnakiAGEeCy0IHGPAm6kg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_vcnakyAGEeCy0IHGPAm6kg"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_vcdpkSAGEeCy0IHGPAm6kg" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EEnum" href="PaletteConfiguration.ecore#//ToolKind"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vcdpkiAGEeCy0IHGPAm6kg" x="335" y="368"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_NRyAEU-1EeCh7u1nEJOyLA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_NRyAFE-1EeCh7u1nEJOyLA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_NRyAFU-1EeCh7u1nEJOyLA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_gi_yEE-1EeCh7u1nEJOyLA" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//ElementDescriptor/elementTypeId"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_gi_yEU-1EeCh7u1nEJOyLA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_mH4W8E-1EeCh7u1nEJOyLA" type="2001">
- <element xmi:type="ecore:EAttribute" href="PaletteConfiguration.ecore#//ElementDescriptor/graphicalHints"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_mH4W8U-1EeCh7u1nEJOyLA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_NRyAFk-1EeCh7u1nEJOyLA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_NRyAF0-1EeCh7u1nEJOyLA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_NRyAGE-1EeCh7u1nEJOyLA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_NR7KAE-1EeCh7u1nEJOyLA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_NR7KAU-1EeCh7u1nEJOyLA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_NR7KAk-1EeCh7u1nEJOyLA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_NR7KA0-1EeCh7u1nEJOyLA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_NRyAEk-1EeCh7u1nEJOyLA" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ElementDescriptor"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NRyAE0-1EeCh7u1nEJOyLA" x="1095" y="565" width="178" height="93"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_kxf2wHAKEeCt7epZDqnVSw" type="1001">
- <children xmi:type="notation:Node" xmi:id="_kxpnwHAKEeCt7epZDqnVSw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_kxpnwXAKEeCt7epZDqnVSw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_kxpnwnAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kxpnw3AKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kxpnxHAKEeCt7epZDqnVSw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_kxpnxXAKEeCt7epZDqnVSw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_kxpnxnAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kxpnx3AKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kxpnyHAKEeCt7epZDqnVSw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_kxf2wXAKEeCt7epZDqnVSw" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//SeparatorConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kxf2wnAKEeCt7epZDqnVSw" x="635" y="490" width="158" height="163"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_nCfB8HAKEeCt7epZDqnVSw" type="1001">
- <children xmi:type="notation:Node" xmi:id="_nCfB83AKEeCt7epZDqnVSw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_nCfB9HAKEeCt7epZDqnVSw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_nCfB9XAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_nCfB9nAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_nCfB93AKEeCt7epZDqnVSw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_nCfB-HAKEeCt7epZDqnVSw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_nCfB-XAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_nCfB-nAKEeCt7epZDqnVSw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_nCfB-3AKEeCt7epZDqnVSw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_nCfB8XAKEeCt7epZDqnVSw" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//LeafConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nCfB8nAKEeCt7epZDqnVSw" x="795" y="365" width="158" height="58"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_quPlkd3cEd-vY7OSNoF8nA"/>
- <element xmi:type="ecore:EPackage" href="PaletteConfiguration.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_HkoiEN3dEd-vY7OSNoF8nA" type="3002" source="_Vqk38OAgEd-0CYOJPs0ewQ" target="_50zD4OAfEd-0CYOJPs0ewQ">
- <children xmi:type="notation:Node" xmi:id="_HkoiFN3dEd-vY7OSNoF8nA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_HkoiFd3dEd-vY7OSNoF8nA" x="6" y="-21"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_HkoiFt3dEd-vY7OSNoF8nA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_HkoiF93dEd-vY7OSNoF8nA" x="2" y="9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_HkoiEd3dEd-vY7OSNoF8nA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_HkoiEt3dEd-vY7OSNoF8nA" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//DrawerConfiguration/ownedConfigurations"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HkoiE93dEd-vY7OSNoF8nA" points="[0, 0, 0, 67]$[0, -67, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIU2cOAhEd-0CYOJPs0ewQ" id="(0.9824561403508771,0.10294117647058823)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HkoiGN3dEd-vY7OSNoF8nA" id="(0.07575757575757576,0.22058823529411764)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_vgrvwOAfEd-0CYOJPs0ewQ" type="3002" source="_tJSakOAfEd-0CYOJPs0ewQ" target="_nCfB8HAKEeCt7epZDqnVSw">
- <children xmi:type="notation:Node" xmi:id="_vgrvxOAfEd-0CYOJPs0ewQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vgrvxeAfEd-0CYOJPs0ewQ" x="-29" y="-18"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vgrvxuAfEd-0CYOJPs0ewQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vgrvx-AfEd-0CYOJPs0ewQ" x="1" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_vgrvweAfEd-0CYOJPs0ewQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_vgrvwuAfEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//StackConfiguration/ownedConfigurations"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vgrvw-AfEd-0CYOJPs0ewQ" points="[0, 0, 89, 60]$[-89, -60, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vgrvyOAfEd-0CYOJPs0ewQ" id="(0.8901734104046243,0.13953488372093023)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vgrvyeAfEd-0CYOJPs0ewQ" id="(0.012658227848101266,0.3793103448275862)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ExtdYOAgEd-0CYOJPs0ewQ" type="3003" source="_tJSakOAfEd-0CYOJPs0ewQ" target="_50zD4OAfEd-0CYOJPs0ewQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ExtdYeAgEd-0CYOJPs0ewQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ExtdYuAgEd-0CYOJPs0ewQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ExtdY-AgEd-0CYOJPs0ewQ" points="[26, 0, -137, 64]$[26, -30, -137, 34]$[155, -30, -8, 34]$[155, -64, -8, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ex3OYOAgEd-0CYOJPs0ewQ" id="(0.49710982658959535,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Hy-O8OAgEd-0CYOJPs0ewQ" id="(0.3235294117647059,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_FH6W4OAgEd-0CYOJPs0ewQ" type="3003" source="_nCfB8HAKEeCt7epZDqnVSw" target="_50zD4OAfEd-0CYOJPs0ewQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_FH6W4eAgEd-0CYOJPs0ewQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_FH6W4uAgEd-0CYOJPs0ewQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_FH6W4-AgEd-0CYOJPs0ewQ" points="[-59, -28, 133, 64]$[-59, -58, 133, 34]$[-168, -58, 24, 34]$[-168, -92, 24, 0]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HNaq0OAgEd-0CYOJPs0ewQ" id="(0.1588235294117647,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_XLcYUOAhEd-0CYOJPs0ewQ" type="3002" source="_Es6HAN3dEd-vY7OSNoF8nA" target="_Vqk38OAgEd-0CYOJPs0ewQ">
- <children xmi:type="notation:Node" xmi:id="_XLcYVOAhEd-0CYOJPs0ewQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_XLcYVeAhEd-0CYOJPs0ewQ" x="16" y="-21"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_XLcYVuAhEd-0CYOJPs0ewQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_XLcYV-AhEd-0CYOJPs0ewQ" x="1" y="14"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_XLcYUeAhEd-0CYOJPs0ewQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_XLcYUuAhEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//PaletteConfiguration/drawerConfigurations"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_XLcYU-AhEd-0CYOJPs0ewQ" points="[174, 21, -73, 13]$[203, 25, -44, 17]$[238, 12, -9, 4]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eWOMAOEpEd-0CYOJPs0ewQ" id="(0.9742489270386266,0.10294117647058823)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_u1gB4OEpEd-0CYOJPs0ewQ" id="(0.03070175438596491,0.14705882352941177)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_OLpa0OEpEd-0CYOJPs0ewQ" type="3003" source="_50zD4OAfEd-0CYOJPs0ewQ" target="_KBEQwOEpEd-0CYOJPs0ewQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_OLpa0eEpEd-0CYOJPs0ewQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_OLpa0uEpEd-0CYOJPs0ewQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OLpa0-EpEd-0CYOJPs0ewQ" points="[6, 0, 285, 148]$[6, -70, 285, 78]$[-265, -70, 14, 78]$[-265, -139, 14, 9]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OLpa1OEpEd-0CYOJPs0ewQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_T2onsOEpEd-0CYOJPs0ewQ" id="(0.425531914893617,0.8676470588235294)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_OojZQOEpEd-0CYOJPs0ewQ" type="3003" source="_Vqk38OAgEd-0CYOJPs0ewQ" target="_KBEQwOEpEd-0CYOJPs0ewQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_OojZQeEpEd-0CYOJPs0ewQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_OojZQuEpEd-0CYOJPs0ewQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OojZQ-EpEd-0CYOJPs0ewQ" points="[3, 0, -57, 144]$[3, -75, -57, 69]$[62, -75, 2, 69]$[62, -144, 2, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OojZROEpEd-0CYOJPs0ewQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_SasOIOEpEd-0CYOJPs0ewQ" id="(0.5,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_dAr8cOEpEd-0CYOJPs0ewQ" type="3003" source="_Es6HAN3dEd-vY7OSNoF8nA" target="_KBEQwOEpEd-0CYOJPs0ewQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_dAr8ceEpEd-0CYOJPs0ewQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_dAr8cuEpEd-0CYOJPs0ewQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dAr8c-EpEd-0CYOJPs0ewQ" points="[6, 0, -394, 146]$[6, -75, -394, 71]$[355, -75, -45, 71]$[355, -144, -45, 2]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dAr8dOEpEd-0CYOJPs0ewQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dAr8deEpEd-0CYOJPs0ewQ" id="(0.7553191489361702,0.9705882352941176)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_EPMx0OHDEd-0CYOJPs0ewQ" type="3002" source="_KBEQwOEpEd-0CYOJPs0ewQ" target="_x9n34OHCEd-0CYOJPs0ewQ">
- <children xmi:type="notation:Node" xmi:id="_EPMx1OHDEd-0CYOJPs0ewQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_EPMx1eHDEd-0CYOJPs0ewQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_EPMx1uHDEd-0CYOJPs0ewQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_EPMx1-HDEd-0CYOJPs0ewQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_EPMx0eHDEd-0CYOJPs0ewQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_EPMx0uHDEd-0CYOJPs0ewQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//Configuration/icon"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_EPMx0-HDEd-0CYOJPs0ewQ" points="[21, 2, -161, 1]$[183, 33, 1, 32]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EPMx2OHDEd-0CYOJPs0ewQ" id="(0.8882978723404256,0.38235294117647056)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EPMx2eHDEd-0CYOJPs0ewQ" id="(0.03731343283582089,0.3230769230769231)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_-CzfIVCeEeCNGbEz50xHuA" type="3002" source="_FwHQcN3dEd-vY7OSNoF8nA" target="_NRyAEU-1EeCh7u1nEJOyLA">
- <children xmi:type="notation:Node" xmi:id="_-C8pEFCeEeCNGbEz50xHuA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_-C8pEVCeEeCNGbEz50xHuA" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_-C8pElCeEeCNGbEz50xHuA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_-C8pE1CeEeCNGbEz50xHuA" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_-CzfIlCeEeCNGbEz50xHuA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_-CzfI1CeEeCNGbEz50xHuA" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//ToolConfiguration/elementDescriptors"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-CzfJFCeEeCNGbEz50xHuA" points="[86, 8, -129, 1]$[216, -10, 1, -17]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-C8pFFCeEeCNGbEz50xHuA" id="(0.0898876404494382,0.1935483870967742)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_0PYhEHAKEeCt7epZDqnVSw" type="3003" source="_kxf2wHAKEeCt7epZDqnVSw" target="_nCfB8HAKEeCt7epZDqnVSw">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_0PYhEXAKEeCt7epZDqnVSw" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_0PYhEnAKEeCt7epZDqnVSw"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_0PYhE3AKEeCt7epZDqnVSw" points="[6, -11, -62, 113]$[69, -136, 1, -12]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0PYhFHAKEeCt7epZDqnVSw" id="(0.8354430379746836,0.0736196319018405)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0PYhFXAKEeCt7epZDqnVSw" id="(0.2974683544303797,0.8620689655172413)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_0uh7MHAKEeCt7epZDqnVSw" type="3003" source="_FwHQcN3dEd-vY7OSNoF8nA" target="_nCfB8HAKEeCt7epZDqnVSw">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_0uh7MXAKEeCt7epZDqnVSw" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_0uh7MnAKEeCt7epZDqnVSw"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_0uh7M3AKEeCt7epZDqnVSw" points="[46, -13, 59, 100]$[46, -48, 59, 65]$[-9, -48, 4, 65]$[-9, -82, 4, 31]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0uh7NHAKEeCt7epZDqnVSw" id="(0.26011560693641617,0.08588957055214724)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_22Ig4HAKEeCt7epZDqnVSw" id="(0.23417721518987342,0.4482758620689655)"/>
- </edges>
-</notation:Diagram>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
index b6baf1bf29b..d24c3200a74 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2015 CEA LIST.&#xD;&#xA;&#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"
+ modelDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen"
editDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen"
editorDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen"
modelPluginID="org.eclipse.papyrus.uml.diagram.paletteconfiguration" modelName="PaletteConfiguration"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ChildConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ChildConfiguration.java
index c286b5ea109..e8dbc0a3c8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ChildConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ChildConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/Configuration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/Configuration.java
index adfbfb1bb02..d3132fd8d87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/Configuration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/Configuration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -15,13 +21,13 @@ import org.eclipse.emf.ecore.EObject;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getLabel <em>Label</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getLabel <em>Label</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getIcon <em>Icon</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getConfiguration()
* @model abstract="true"
@@ -35,7 +41,6 @@ public interface Configuration extends EObject {
* <!-- begin-model-doc -->
* unique identifier of the configuration, used by the tool to retrieve the configuration
* <!-- end-model-doc -->
- *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getConfiguration_Id()
@@ -48,9 +53,7 @@ public interface Configuration extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getId <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Id</em>' attribute.
+ * @param value the new value of the '<em>Id</em>' attribute.
* @see #getId()
* @generated
*/
@@ -63,7 +66,6 @@ public interface Configuration extends EObject {
* <!-- begin-model-doc -->
* label of the configuration, used only for display
* <!-- end-model-doc -->
- *
* @return the value of the '<em>Label</em>' attribute.
* @see #setLabel(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getConfiguration_Label()
@@ -76,9 +78,7 @@ public interface Configuration extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getLabel <em>Label</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Label</em>' attribute.
+ * @param value the new value of the '<em>Label</em>' attribute.
* @see #getLabel()
* @generated
*/
@@ -91,7 +91,6 @@ public interface Configuration extends EObject {
* <!-- begin-model-doc -->
* Description of the configuration.
* <!-- end-model-doc -->
- *
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getConfiguration_Description()
@@ -104,9 +103,7 @@ public interface Configuration extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Description</em>' attribute.
+ * @param value the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
* @generated
*/
@@ -116,10 +113,10 @@ public interface Configuration extends EObject {
* Returns the value of the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Icon</em>' containment reference isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Icon</em>' containment reference isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Icon</em>' containment reference.
* @see #setIcon(IconDescriptor)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getConfiguration_Icon()
@@ -132,9 +129,7 @@ public interface Configuration extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getIcon <em>Icon</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Icon</em>' containment reference.
+ * @param value the new value of the '<em>Icon</em>' containment reference.
* @see #getIcon()
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/DrawerConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/DrawerConfiguration.java
index 14b89b2e495..679f2a899ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/DrawerConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/DrawerConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -15,10 +21,10 @@ import org.eclipse.emf.common.util.EList;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getDrawerConfiguration()
* @model
@@ -30,10 +36,10 @@ public interface DrawerConfiguration extends Configuration {
* The list contents are of type {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Owned Configurations</em>' containment reference list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Owned Configurations</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Owned Configurations</em>' containment reference list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getDrawerConfiguration_OwnedConfigurations()
* @model containment="true" required="true"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ElementDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ElementDescriptor.java
index 8dce47a3742..eba2392d17c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ElementDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ElementDescriptor.java
@@ -1,12 +1,19 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EObject;
/**
@@ -16,11 +23,11 @@ import org.eclipse.emf.ecore.EObject;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getElementTypeId <em>Element Type Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getGraphicalHints <em>Graphical Hints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getElementTypeId <em>Element Type Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getGraphicalHints <em>Graphical Hints</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getElementDescriptor()
* @model
@@ -31,10 +38,10 @@ public interface ElementDescriptor extends EObject {
* Returns the value of the '<em><b>Element Type Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Element Type Id</em>' attribute isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Element Type Id</em>' attribute isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Element Type Id</em>' attribute.
* @see #setElementTypeId(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getElementDescriptor_ElementTypeId()
@@ -47,9 +54,7 @@ public interface ElementDescriptor extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getElementTypeId <em>Element Type Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Element Type Id</em>' attribute.
+ * @param value the new value of the '<em>Element Type Id</em>' attribute.
* @see #getElementTypeId()
* @generated
*/
@@ -60,10 +65,10 @@ public interface ElementDescriptor extends EObject {
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Graphical Hints</em>' attribute list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Graphical Hints</em>' attribute list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Graphical Hints</em>' attribute list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getElementDescriptor_GraphicalHints()
* @model
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/IconDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/IconDescriptor.java
index f570034673c..c639c92782f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/IconDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/IconDescriptor.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -19,11 +25,11 @@ import org.eclipse.emf.ecore.EObject;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getPluginID <em>Plugin ID</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getIconPath <em>Icon Path</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getPluginID <em>Plugin ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getIconPath <em>Icon Path</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getIconDescriptor()
* @model
@@ -37,7 +43,6 @@ public interface IconDescriptor extends EObject {
* <!-- begin-model-doc -->
* ID of the plugin where the icon is located. If not set, the tool will look in the bundle defining the palette.
* <!-- end-model-doc -->
- *
* @return the value of the '<em>Plugin ID</em>' attribute.
* @see #setPluginID(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getIconDescriptor_PluginID()
@@ -50,9 +55,7 @@ public interface IconDescriptor extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getPluginID <em>Plugin ID</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Plugin ID</em>' attribute.
+ * @param value the new value of the '<em>Plugin ID</em>' attribute.
* @see #getPluginID()
* @generated
*/
@@ -63,9 +66,8 @@ public interface IconDescriptor extends EObject {
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
- * Path of the icon in the bundle.
+ * Path of the icon in the bundle.
* <!-- end-model-doc -->
- *
* @return the value of the '<em>Icon Path</em>' attribute.
* @see #setIconPath(String)
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getIconDescriptor_IconPath()
@@ -78,9 +80,7 @@ public interface IconDescriptor extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getIconPath <em>Icon Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Icon Path</em>' attribute.
+ * @param value the new value of the '<em>Icon Path</em>' attribute.
* @see #getIconPath()
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/LeafConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/LeafConfiguration.java
index 70b7d64afc6..f72239e8c22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/LeafConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/LeafConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteConfiguration.java
index 442b81f06c8..cce28b2a524 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -15,11 +21,11 @@ import org.eclipse.emf.common.util.EList;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getDrawerConfigurations <em>Drawer Configurations</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getRequiredProfiles <em>Required Profiles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getDrawerConfigurations <em>Drawer Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getRequiredProfiles <em>Required Profiles</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getPaletteConfiguration()
* @model
@@ -31,10 +37,10 @@ public interface PaletteConfiguration extends Configuration {
* The list contents are of type {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Drawer Configurations</em>' containment reference list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Drawer Configurations</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Drawer Configurations</em>' containment reference list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getPaletteConfiguration_DrawerConfigurations()
* @model containment="true" required="true"
@@ -47,10 +53,10 @@ public interface PaletteConfiguration extends Configuration {
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Required Profiles</em>' attribute list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Required Profiles</em>' attribute list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Required Profiles</em>' attribute list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getPaletteConfiguration_RequiredProfiles()
* @model
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationFactory.java
index 506c86d19a8..1ac53847b44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationFactory.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -13,7 +19,6 @@ import org.eclipse.emf.ecore.EFactory;
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage
* @generated
*/
@@ -22,7 +27,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
PaletteconfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationFactoryImpl.init();
@@ -31,7 +35,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Palette Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Palette Configuration</em>'.
* @generated
*/
@@ -41,7 +44,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Tool Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Tool Configuration</em>'.
* @generated
*/
@@ -51,7 +53,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Stack Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Stack Configuration</em>'.
* @generated
*/
@@ -61,7 +62,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Drawer Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Drawer Configuration</em>'.
* @generated
*/
@@ -71,7 +71,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Icon Descriptor</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Icon Descriptor</em>'.
* @generated
*/
@@ -81,7 +80,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Element Descriptor</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Element Descriptor</em>'.
* @generated
*/
@@ -91,7 +89,6 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns a new object of class '<em>Separator Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Separator Configuration</em>'.
* @generated
*/
@@ -101,10 +98,9 @@ public interface PaletteconfigurationFactory extends EFactory {
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the package supported by this factory.
* @generated
*/
PaletteconfigurationPackage getPaletteconfigurationPackage();
-} // PaletteconfigurationFactory
+} //PaletteconfigurationFactory
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationPackage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationPackage.java
index 2fca9a0d4d1..84ed7444cc1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationPackage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/PaletteconfigurationPackage.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -17,13 +23,12 @@ import org.eclipse.emf.ecore.EReference;
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory
* @model kind="package"
* @generated
@@ -33,7 +38,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
String eNAME = "paletteconfiguration";
@@ -42,7 +46,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7";
@@ -51,7 +54,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
String eNS_PREFIX = "paletteconfiguration";
@@ -60,7 +62,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
PaletteconfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl.init();
@@ -69,7 +70,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl <em>Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getConfiguration()
* @generated
@@ -80,7 +80,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -90,7 +89,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -100,7 +98,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -110,7 +107,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -120,7 +116,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -130,7 +125,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl <em>Palette Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getPaletteConfiguration()
* @generated
@@ -141,7 +135,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -151,7 +144,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -161,7 +153,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -171,7 +162,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -181,7 +171,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Drawer Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -191,7 +180,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Required Profiles</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -201,7 +189,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Palette Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -211,7 +198,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ChildConfigurationImpl <em>Child Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ChildConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getChildConfiguration()
* @generated
@@ -222,7 +208,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -232,7 +217,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -242,7 +226,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -252,7 +235,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -262,7 +244,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Child Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -272,7 +253,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.LeafConfigurationImpl <em>Leaf Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.LeafConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getLeafConfiguration()
* @generated
@@ -283,7 +263,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -293,7 +272,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -303,7 +281,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -313,7 +290,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -323,7 +299,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Leaf Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -333,7 +308,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl <em>Tool Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getToolConfiguration()
* @generated
@@ -344,7 +318,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -354,7 +327,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -364,7 +336,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -374,7 +345,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -384,7 +354,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -394,7 +363,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Element Descriptors</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -404,7 +372,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Tool Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -414,7 +381,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl <em>Stack Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getStackConfiguration()
* @generated
@@ -425,7 +391,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -435,7 +400,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -445,7 +409,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -455,7 +418,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -465,7 +427,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Owned Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -475,7 +436,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Stack Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -485,7 +445,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl <em>Drawer Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getDrawerConfiguration()
* @generated
@@ -496,7 +455,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -506,7 +464,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -516,7 +473,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -526,7 +482,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -536,7 +491,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Owned Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -546,7 +500,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Drawer Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -556,7 +509,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl <em>Icon Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getIconDescriptor()
* @generated
@@ -567,7 +519,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Plugin ID</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -577,7 +528,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon Path</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -587,7 +537,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Icon Descriptor</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -597,7 +546,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl <em>Element Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getElementDescriptor()
* @generated
@@ -608,7 +556,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Element Type Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -618,7 +565,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Graphical Hints</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -628,7 +574,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Element Descriptor</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -638,7 +583,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.SeparatorConfigurationImpl <em>Separator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.SeparatorConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getSeparatorConfiguration()
* @generated
@@ -649,7 +593,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -659,7 +602,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -669,7 +611,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -679,7 +620,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The feature id for the '<em><b>Icon</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -689,7 +629,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The number of structural features of the '<em>Separator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -699,7 +638,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind <em>Tool Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getToolKind()
* @generated
@@ -711,7 +649,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration <em>Palette Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Palette Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration
* @generated
@@ -722,7 +659,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getDrawerConfigurations <em>Drawer Configurations</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Drawer Configurations</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getDrawerConfigurations()
* @see #getPaletteConfiguration()
@@ -734,7 +670,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getRequiredProfiles <em>Required Profiles</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute list '<em>Required Profiles</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration#getRequiredProfiles()
* @see #getPaletteConfiguration()
@@ -746,7 +681,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration <em>Tool Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Tool Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration
* @generated
@@ -757,7 +691,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getKind <em>Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Kind</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getKind()
* @see #getToolConfiguration()
@@ -769,7 +702,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getElementDescriptors <em>Element Descriptors</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Element Descriptors</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getElementDescriptors()
* @see #getToolConfiguration()
@@ -781,7 +713,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration <em>Stack Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Stack Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration
* @generated
@@ -792,7 +723,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Owned Configurations</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration#getOwnedConfigurations()
* @see #getStackConfiguration()
@@ -804,7 +734,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration <em>Child Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Child Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration
* @generated
@@ -815,7 +744,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration <em>Drawer Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Drawer Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration
* @generated
@@ -826,7 +754,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Owned Configurations</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration#getOwnedConfigurations()
* @see #getDrawerConfiguration()
@@ -838,7 +765,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration <em>Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration
* @generated
@@ -849,7 +775,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getId()
* @see #getConfiguration()
@@ -861,7 +786,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getLabel <em>Label</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Label</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getLabel()
* @see #getConfiguration()
@@ -873,7 +797,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getDescription <em>Description</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Description</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getDescription()
* @see #getConfiguration()
@@ -885,7 +808,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getIcon <em>Icon</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the containment reference '<em>Icon</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration#getIcon()
* @see #getConfiguration()
@@ -897,7 +819,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor <em>Icon Descriptor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Icon Descriptor</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor
* @generated
@@ -908,7 +829,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getPluginID <em>Plugin ID</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Plugin ID</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getPluginID()
* @see #getIconDescriptor()
@@ -920,7 +840,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getIconPath <em>Icon Path</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Icon Path</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor#getIconPath()
* @see #getIconDescriptor()
@@ -932,7 +851,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor <em>Element Descriptor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Element Descriptor</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor
* @generated
@@ -943,7 +861,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getElementTypeId <em>Element Type Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Element Type Id</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getElementTypeId()
* @see #getElementDescriptor()
@@ -955,7 +872,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getGraphicalHints <em>Graphical Hints</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute list '<em>Graphical Hints</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor#getGraphicalHints()
* @see #getElementDescriptor()
@@ -967,7 +883,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration <em>Separator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Separator Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration
* @generated
@@ -978,7 +893,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration <em>Leaf Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Leaf Configuration</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration
* @generated
@@ -989,7 +903,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the meta object for enum '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind <em>Tool Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for enum '<em>Tool Kind</em>'.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind
* @generated
@@ -1000,7 +913,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -1010,13 +922,12 @@ public interface PaletteconfigurationPackage extends EPackage {
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @generated
*/
interface Literals {
@@ -1024,7 +935,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl <em>Palette Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getPaletteConfiguration()
* @generated
@@ -1035,7 +945,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Drawer Configurations</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS = eINSTANCE.getPaletteConfiguration_DrawerConfigurations();
@@ -1044,7 +953,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Required Profiles</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute PALETTE_CONFIGURATION__REQUIRED_PROFILES = eINSTANCE.getPaletteConfiguration_RequiredProfiles();
@@ -1053,7 +961,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl <em>Tool Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getToolConfiguration()
* @generated
@@ -1064,7 +971,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute TOOL_CONFIGURATION__KIND = eINSTANCE.getToolConfiguration_Kind();
@@ -1073,7 +979,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Element Descriptors</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS = eINSTANCE.getToolConfiguration_ElementDescriptors();
@@ -1082,7 +987,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl <em>Stack Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getStackConfiguration()
* @generated
@@ -1093,7 +997,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Owned Configurations</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference STACK_CONFIGURATION__OWNED_CONFIGURATIONS = eINSTANCE.getStackConfiguration_OwnedConfigurations();
@@ -1102,7 +1005,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ChildConfigurationImpl <em>Child Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ChildConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getChildConfiguration()
* @generated
@@ -1113,7 +1015,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl <em>Drawer Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getDrawerConfiguration()
* @generated
@@ -1124,7 +1025,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Owned Configurations</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS = eINSTANCE.getDrawerConfiguration_OwnedConfigurations();
@@ -1133,7 +1033,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl <em>Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getConfiguration()
* @generated
@@ -1144,7 +1043,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute CONFIGURATION__ID = eINSTANCE.getConfiguration_Id();
@@ -1153,7 +1051,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Label</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute CONFIGURATION__LABEL = eINSTANCE.getConfiguration_Label();
@@ -1162,7 +1059,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Description</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute CONFIGURATION__DESCRIPTION = eINSTANCE.getConfiguration_Description();
@@ -1171,7 +1067,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Icon</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference CONFIGURATION__ICON = eINSTANCE.getConfiguration_Icon();
@@ -1180,7 +1075,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl <em>Icon Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getIconDescriptor()
* @generated
@@ -1191,7 +1085,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Plugin ID</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute ICON_DESCRIPTOR__PLUGIN_ID = eINSTANCE.getIconDescriptor_PluginID();
@@ -1200,7 +1093,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Icon Path</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute ICON_DESCRIPTOR__ICON_PATH = eINSTANCE.getIconDescriptor_IconPath();
@@ -1209,7 +1101,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl <em>Element Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getElementDescriptor()
* @generated
@@ -1220,7 +1111,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Element Type Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID = eINSTANCE.getElementDescriptor_ElementTypeId();
@@ -1229,7 +1119,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '<em><b>Graphical Hints</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS = eINSTANCE.getElementDescriptor_GraphicalHints();
@@ -1238,7 +1127,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.SeparatorConfigurationImpl <em>Separator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.SeparatorConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getSeparatorConfiguration()
* @generated
@@ -1249,7 +1137,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.LeafConfigurationImpl <em>Leaf Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.LeafConfigurationImpl
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getLeafConfiguration()
* @generated
@@ -1260,7 +1147,6 @@ public interface PaletteconfigurationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind <em>Tool Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteconfigurationPackageImpl#getToolKind()
* @generated
@@ -1269,4 +1155,4 @@ public interface PaletteconfigurationPackage extends EPackage {
}
-} // PaletteconfigurationPackage
+} //PaletteconfigurationPackage
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/SeparatorConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/SeparatorConfiguration.java
index 17fc8226631..761212eac75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/SeparatorConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/SeparatorConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/StackConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/StackConfiguration.java
index b2aeb355391..731112e69dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/StackConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/StackConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -15,10 +21,10 @@ import org.eclipse.emf.common.util.EList;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration#getOwnedConfigurations <em>Owned Configurations</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getStackConfiguration()
* @model
@@ -30,10 +36,10 @@ public interface StackConfiguration extends ChildConfiguration {
* The list contents are of type {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Owned Configurations</em>' containment reference list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Owned Configurations</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Owned Configurations</em>' containment reference list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getStackConfiguration_OwnedConfigurations()
* @model containment="true" required="true"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolConfiguration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolConfiguration.java
index 04f80aeadc8..d5e7b352793 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolConfiguration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolConfiguration.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -15,11 +21,11 @@ import org.eclipse.emf.common.util.EList;
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getElementDescriptors <em>Element Descriptors</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getElementDescriptors <em>Element Descriptors</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getToolConfiguration()
* @model
@@ -32,10 +38,10 @@ public interface ToolConfiguration extends LeafConfiguration {
* The literals are from the enumeration {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Kind</em>' attribute isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Kind</em>' attribute isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Kind</em>' attribute.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind
* @see #setKind(ToolKind)
@@ -49,9 +55,7 @@ public interface ToolConfiguration extends LeafConfiguration {
* Sets the value of the '{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration#getKind <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Kind</em>' attribute.
+ * @param value the new value of the '<em>Kind</em>' attribute.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind
* @see #getKind()
* @generated
@@ -63,10 +67,10 @@ public interface ToolConfiguration extends LeafConfiguration {
* The list contents are of type {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Element Descriptors</em>' containment reference list isn't clear, there really should be more of a description here...
+ * If the meaning of the '<em>Element Descriptors</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Element Descriptors</em>' containment reference list.
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getToolConfiguration_ElementDescriptors()
* @model containment="true"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolKind.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolKind.java
index e7573e178eb..d0bf480b1ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolKind.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/ToolKind.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration;
@@ -17,7 +23,6 @@ import org.eclipse.emf.common.util.Enumerator;
* A representation of the literals of the enumeration '<em><b>Tool Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#getToolKind()
* @model
* @generated
@@ -27,7 +32,6 @@ public enum ToolKind implements Enumerator {
* The '<em><b>Creation Tool</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #CREATION_TOOL_VALUE
* @generated
* @ordered
@@ -38,7 +42,6 @@ public enum ToolKind implements Enumerator {
* The '<em><b>Connection Tool</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #CONNECTION_TOOL_VALUE
* @generated
* @ordered
@@ -49,10 +52,10 @@ public enum ToolKind implements Enumerator {
* The '<em><b>Creation Tool</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Creation Tool</b></em>' literal object isn't clear, there really should be more of a description here...
+ * If the meaning of '<em><b>Creation Tool</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @see #CREATION_TOOL
* @model name="CreationTool"
* @generated
@@ -64,10 +67,10 @@ public enum ToolKind implements Enumerator {
* The '<em><b>Connection Tool</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Connection Tool</b></em>' literal object isn't clear, there really should be more of a description here...
+ * If the meaning of '<em><b>Connection Tool</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @see #CONNECTION_TOOL
* @model name="ConnectionTool"
* @generated
@@ -79,20 +82,18 @@ public enum ToolKind implements Enumerator {
* An array of all the '<em><b>Tool Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private static final ToolKind[] VALUES_ARRAY =
- new ToolKind[] {
- CREATION_TOOL,
- CONNECTION_TOOL,
- };
+ new ToolKind[] {
+ CREATION_TOOL,
+ CONNECTION_TOOL,
+ };
/**
* A public read-only list of all the '<em><b>Tool Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static final List<ToolKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
@@ -101,7 +102,8 @@ public enum ToolKind implements Enumerator {
* Returns the '<em><b>Tool Kind</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @param literal the literal.
+ * @return the matching enumerator or <code>null</code>.
* @generated
*/
public static ToolKind get(String literal) {
@@ -118,7 +120,8 @@ public enum ToolKind implements Enumerator {
* Returns the '<em><b>Tool Kind</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @param name the name.
+ * @return the matching enumerator or <code>null</code>.
* @generated
*/
public static ToolKind getByName(String name) {
@@ -135,15 +138,14 @@ public enum ToolKind implements Enumerator {
* Returns the '<em><b>Tool Kind</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @param value the integer value.
+ * @return the matching enumerator or <code>null</code>.
* @generated
*/
public static ToolKind get(int value) {
switch (value) {
- case CREATION_TOOL_VALUE:
- return CREATION_TOOL;
- case CONNECTION_TOOL_VALUE:
- return CONNECTION_TOOL;
+ case CREATION_TOOL_VALUE: return CREATION_TOOL;
+ case CONNECTION_TOOL_VALUE: return CONNECTION_TOOL;
}
return null;
}
@@ -151,7 +153,6 @@ public enum ToolKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private final int value;
@@ -159,7 +160,6 @@ public enum ToolKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private final String name;
@@ -167,7 +167,6 @@ public enum ToolKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private final String literal;
@@ -176,7 +175,6 @@ public enum ToolKind implements Enumerator {
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private ToolKind(int value, String name, String literal) {
@@ -188,43 +186,39 @@ public enum ToolKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public int getValue() {
- return value;
+ return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getName() {
- return name;
+ return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getLiteral() {
- return literal;
+ return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
return literal;
}
-
-} // ToolKind
+
+} //ToolKind
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ChildConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ChildConfigurationImpl.java
index 8f37b4f16c2..359c73ac1e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ChildConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ChildConfigurationImpl.java
@@ -1,12 +1,19 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import org.eclipse.emf.ecore.EClass;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -14,8 +21,6 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Child Configuration</b></em>'.
* <!-- end-user-doc -->
- * <p>
- * </p>
*
* @generated
*/
@@ -23,7 +28,6 @@ public abstract class ChildConfigurationImpl extends ConfigurationImpl implement
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ChildConfigurationImpl() {
@@ -33,7 +37,6 @@ public abstract class ChildConfigurationImpl extends ConfigurationImpl implement
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -41,4 +44,4 @@ public abstract class ChildConfigurationImpl extends ConfigurationImpl implement
return PaletteconfigurationPackage.Literals.CHILD_CONFIGURATION;
}
-} // ChildConfigurationImpl
+} //ChildConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ConfigurationImpl.java
index fb68f0cb5f7..3d02783a98b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ConfigurationImpl.java
@@ -1,17 +1,26 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -22,13 +31,13 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getLabel <em>Label</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getLabel <em>Label</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ConfigurationImpl#getIcon <em>Icon</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -37,7 +46,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getId()
* @generated
* @ordered
@@ -48,7 +56,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getId()
* @generated
* @ordered
@@ -59,7 +66,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getLabel()
* @generated
* @ordered
@@ -70,7 +76,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getLabel()
* @generated
* @ordered
@@ -81,7 +86,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getDescription()
* @generated
* @ordered
@@ -92,7 +96,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getDescription()
* @generated
* @ordered
@@ -103,7 +106,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* The cached value of the '{@link #getIcon() <em>Icon</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getIcon()
* @generated
* @ordered
@@ -113,7 +115,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ConfigurationImpl() {
@@ -123,7 +124,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -134,7 +134,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getId() {
@@ -144,21 +143,18 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.CONFIGURATION__ID, oldId, id));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getLabel() {
@@ -168,21 +164,18 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setLabel(String newLabel) {
String oldLabel = label;
label = newLabel;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.CONFIGURATION__LABEL, oldLabel, label));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getDescription() {
@@ -192,21 +185,18 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION, oldDescription, description));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public IconDescriptor getIcon() {
@@ -216,7 +206,6 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public NotificationChain basicSetIcon(IconDescriptor newIcon, NotificationChain msgs) {
@@ -224,11 +213,7 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
icon = newIcon;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.CONFIGURATION__ICON, oldIcon, newIcon);
- if (msgs == null) {
- msgs = notification;
- } else {
- msgs.add(notification);
- }
+ if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
@@ -236,39 +221,32 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setIcon(IconDescriptor newIcon) {
if (newIcon != icon) {
NotificationChain msgs = null;
- if (icon != null) {
- msgs = ((InternalEObject) icon).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PaletteconfigurationPackage.CONFIGURATION__ICON, null, msgs);
- }
- if (newIcon != null) {
- msgs = ((InternalEObject) newIcon).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PaletteconfigurationPackage.CONFIGURATION__ICON, null, msgs);
- }
+ if (icon != null)
+ msgs = ((InternalEObject)icon).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PaletteconfigurationPackage.CONFIGURATION__ICON, null, msgs);
+ if (newIcon != null)
+ msgs = ((InternalEObject)newIcon).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PaletteconfigurationPackage.CONFIGURATION__ICON, null, msgs);
msgs = basicSetIcon(newIcon, msgs);
- if (msgs != null) {
- msgs.dispatch();
- }
+ if (msgs != null) msgs.dispatch();
}
- else if (eNotificationRequired()) {
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.CONFIGURATION__ICON, newIcon, newIcon));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- return basicSetIcon(null, msgs);
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ return basicSetIcon(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -276,20 +254,19 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.CONFIGURATION__ID:
- return getId();
- case PaletteconfigurationPackage.CONFIGURATION__LABEL:
- return getLabel();
- case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
- return getDescription();
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- return getIcon();
+ case PaletteconfigurationPackage.CONFIGURATION__ID:
+ return getId();
+ case PaletteconfigurationPackage.CONFIGURATION__LABEL:
+ return getLabel();
+ case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
+ return getDescription();
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ return getIcon();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -297,24 +274,23 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.CONFIGURATION__ID:
- setId((String) newValue);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__LABEL:
- setLabel((String) newValue);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
- setDescription((String) newValue);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- setIcon((IconDescriptor) newValue);
- return;
+ case PaletteconfigurationPackage.CONFIGURATION__ID:
+ setId((String)newValue);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__LABEL:
+ setLabel((String)newValue);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
+ setDescription((String)newValue);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ setIcon((IconDescriptor)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -322,24 +298,23 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.CONFIGURATION__ID:
- setId(ID_EDEFAULT);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__LABEL:
- setLabel(LABEL_EDEFAULT);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- setIcon((IconDescriptor) null);
- return;
+ case PaletteconfigurationPackage.CONFIGURATION__ID:
+ setId(ID_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__LABEL:
+ setLabel(LABEL_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ setIcon((IconDescriptor)null);
+ return;
}
super.eUnset(featureID);
}
@@ -347,20 +322,19 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.CONFIGURATION__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- case PaletteconfigurationPackage.CONFIGURATION__LABEL:
- return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
- case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case PaletteconfigurationPackage.CONFIGURATION__ICON:
- return icon != null;
+ case PaletteconfigurationPackage.CONFIGURATION__ID:
+ return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case PaletteconfigurationPackage.CONFIGURATION__LABEL:
+ return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
+ case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ return icon != null;
}
return super.eIsSet(featureID);
}
@@ -368,14 +342,11 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
@@ -388,4 +359,4 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
return result.toString();
}
-} // ConfigurationImpl
+} //ConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/DrawerConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/DrawerConfigurationImpl.java
index 38ee34f7efe..0f28f3ae75c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/DrawerConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/DrawerConfigurationImpl.java
@@ -1,19 +1,29 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
+
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -24,10 +34,10 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl#getOwnedConfigurations <em>Owned Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.DrawerConfigurationImpl#getOwnedConfigurations <em>Owned Configurations</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -36,7 +46,6 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
* The cached value of the '{@link #getOwnedConfigurations() <em>Owned Configurations</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getOwnedConfigurations()
* @generated
* @ordered
@@ -46,7 +55,6 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected DrawerConfigurationImpl() {
@@ -56,7 +64,6 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -67,7 +74,6 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<ChildConfiguration> getOwnedConfigurations() {
@@ -80,14 +86,13 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- return ((InternalEList<?>) getOwnedConfigurations()).basicRemove(otherEnd, msgs);
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return ((InternalEList<?>)getOwnedConfigurations()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -95,14 +100,13 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- return getOwnedConfigurations();
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return getOwnedConfigurations();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -110,17 +114,16 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- getOwnedConfigurations().clear();
- getOwnedConfigurations().addAll((Collection<? extends ChildConfiguration>) newValue);
- return;
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ getOwnedConfigurations().clear();
+ getOwnedConfigurations().addAll((Collection<? extends ChildConfiguration>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -128,15 +131,14 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- getOwnedConfigurations().clear();
- return;
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ getOwnedConfigurations().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -144,16 +146,15 @@ public class DrawerConfigurationImpl extends ConfigurationImpl implements Drawer
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
- return ownedConfigurations != null && !ownedConfigurations.isEmpty();
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return ownedConfigurations != null && !ownedConfigurations.isEmpty();
}
return super.eIsSet(featureID);
}
-} // DrawerConfigurationImpl
+} //DrawerConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ElementDescriptorImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ElementDescriptorImpl.java
index 2d6c9ff84c1..dd866608282 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ElementDescriptorImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ElementDescriptorImpl.java
@@ -1,19 +1,30 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.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.impl.EObjectImpl;
+
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -23,11 +34,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl#getElementTypeId <em>Element Type Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl#getGraphicalHints <em>Graphical Hints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl#getElementTypeId <em>Element Type Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ElementDescriptorImpl#getGraphicalHints <em>Graphical Hints</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -36,7 +47,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
* The default value of the '{@link #getElementTypeId() <em>Element Type Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getElementTypeId()
* @generated
* @ordered
@@ -47,7 +57,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
* The cached value of the '{@link #getElementTypeId() <em>Element Type Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getElementTypeId()
* @generated
* @ordered
@@ -58,7 +67,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
* The cached value of the '{@link #getGraphicalHints() <em>Graphical Hints</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getGraphicalHints()
* @generated
* @ordered
@@ -68,7 +76,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ElementDescriptorImpl() {
@@ -78,7 +85,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -89,7 +95,6 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getElementTypeId() {
@@ -99,21 +104,18 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setElementTypeId(String newElementTypeId) {
String oldElementTypeId = elementTypeId;
elementTypeId = newElementTypeId;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID, oldElementTypeId, elementTypeId));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<String> getGraphicalHints() {
@@ -126,16 +128,15 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
- return getElementTypeId();
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
- return getGraphicalHints();
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
+ return getElementTypeId();
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
+ return getGraphicalHints();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -143,20 +144,19 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
- setElementTypeId((String) newValue);
- return;
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
- getGraphicalHints().clear();
- getGraphicalHints().addAll((Collection<? extends String>) newValue);
- return;
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
+ setElementTypeId((String)newValue);
+ return;
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
+ getGraphicalHints().clear();
+ getGraphicalHints().addAll((Collection<? extends String>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -164,18 +164,17 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
- setElementTypeId(ELEMENT_TYPE_ID_EDEFAULT);
- return;
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
- getGraphicalHints().clear();
- return;
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
+ setElementTypeId(ELEMENT_TYPE_ID_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
+ getGraphicalHints().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -183,16 +182,15 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
- return ELEMENT_TYPE_ID_EDEFAULT == null ? elementTypeId != null : !ELEMENT_TYPE_ID_EDEFAULT.equals(elementTypeId);
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
- return graphicalHints != null && !graphicalHints.isEmpty();
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID:
+ return ELEMENT_TYPE_ID_EDEFAULT == null ? elementTypeId != null : !ELEMENT_TYPE_ID_EDEFAULT.equals(elementTypeId);
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS:
+ return graphicalHints != null && !graphicalHints.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -200,14 +198,11 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elementTypeId: ");
@@ -218,4 +213,4 @@ public class ElementDescriptorImpl extends EObjectImpl implements ElementDescrip
return result.toString();
}
-} // ElementDescriptorImpl
+} //ElementDescriptorImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/IconDescriptorImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/IconDescriptorImpl.java
index d27f6cbae5f..9bb8e86cb1b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/IconDescriptorImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/IconDescriptorImpl.java
@@ -1,15 +1,24 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EClass;
+
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -19,11 +28,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getPluginID <em>Plugin ID</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getIconPath <em>Icon Path</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getPluginID <em>Plugin ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getIconPath <em>Icon Path</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -32,7 +41,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
* The default value of the '{@link #getPluginID() <em>Plugin ID</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPluginID()
* @generated
* @ordered
@@ -43,7 +51,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
* The cached value of the '{@link #getPluginID() <em>Plugin ID</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPluginID()
* @generated
* @ordered
@@ -54,7 +61,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
* The default value of the '{@link #getIconPath() <em>Icon Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getIconPath()
* @generated
* @ordered
@@ -65,7 +71,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
* The cached value of the '{@link #getIconPath() <em>Icon Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getIconPath()
* @generated
* @ordered
@@ -75,7 +80,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected IconDescriptorImpl() {
@@ -85,7 +89,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -96,7 +99,6 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getPluginID() {
@@ -106,21 +108,18 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setPluginID(String newPluginID) {
String oldPluginID = pluginID;
pluginID = newPluginID;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID, oldPluginID, pluginID));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String getIconPath() {
@@ -130,30 +129,27 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setIconPath(String newIconPath) {
String oldIconPath = iconPath;
iconPath = newIconPath;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH, oldIconPath, iconPath));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
- return getPluginID();
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
- return getIconPath();
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
+ return getPluginID();
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
+ return getIconPath();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -161,18 +157,17 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
- setPluginID((String) newValue);
- return;
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
- setIconPath((String) newValue);
- return;
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
+ setPluginID((String)newValue);
+ return;
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
+ setIconPath((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -180,18 +175,17 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
- setPluginID(PLUGIN_ID_EDEFAULT);
- return;
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
- setIconPath(ICON_PATH_EDEFAULT);
- return;
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
+ setPluginID(PLUGIN_ID_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
+ setIconPath(ICON_PATH_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -199,16 +193,15 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
- return PLUGIN_ID_EDEFAULT == null ? pluginID != null : !PLUGIN_ID_EDEFAULT.equals(pluginID);
- case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
- return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath);
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID:
+ return PLUGIN_ID_EDEFAULT == null ? pluginID != null : !PLUGIN_ID_EDEFAULT.equals(pluginID);
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH:
+ return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath);
}
return super.eIsSet(featureID);
}
@@ -216,14 +209,11 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (pluginID: ");
@@ -234,4 +224,4 @@ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor {
return result.toString();
}
-} // IconDescriptorImpl
+} //IconDescriptorImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/LeafConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/LeafConfigurationImpl.java
index 2a52c80bc51..30d02fad8e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/LeafConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/LeafConfigurationImpl.java
@@ -1,12 +1,19 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import org.eclipse.emf.ecore.EClass;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -14,8 +21,6 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Leaf Configuration</b></em>'.
* <!-- end-user-doc -->
- * <p>
- * </p>
*
* @generated
*/
@@ -23,7 +28,6 @@ public abstract class LeafConfigurationImpl extends ChildConfigurationImpl imple
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected LeafConfigurationImpl() {
@@ -33,7 +37,6 @@ public abstract class LeafConfigurationImpl extends ChildConfigurationImpl imple
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -41,4 +44,4 @@ public abstract class LeafConfigurationImpl extends ChildConfigurationImpl imple
return PaletteconfigurationPackage.Literals.LEAF_CONFIGURATION;
}
-} // LeafConfigurationImpl
+} //LeafConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteConfigurationImpl.java
index 0b40ad22429..edfe31ca4b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteConfigurationImpl.java
@@ -1,20 +1,30 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
+
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -25,11 +35,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Paletteconfiguration
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl#getDrawerConfigurations <em>Drawer Configurations</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl#getRequiredProfiles <em>Required Profiles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl#getDrawerConfigurations <em>Drawer Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.PaletteConfigurationImpl#getRequiredProfiles <em>Required Profiles</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -38,7 +48,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
* The cached value of the '{@link #getDrawerConfigurations() <em>Drawer Configurations</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getDrawerConfigurations()
* @generated
* @ordered
@@ -49,7 +58,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
* The cached value of the '{@link #getRequiredProfiles() <em>Required Profiles</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getRequiredProfiles()
* @generated
* @ordered
@@ -59,7 +67,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected PaletteConfigurationImpl() {
@@ -69,7 +76,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -80,7 +86,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<DrawerConfiguration> getDrawerConfigurations() {
@@ -93,7 +98,6 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<String> getRequiredProfiles() {
@@ -106,14 +110,13 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- return ((InternalEList<?>) getDrawerConfigurations()).basicRemove(otherEnd, msgs);
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ return ((InternalEList<?>)getDrawerConfigurations()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -121,16 +124,15 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- return getDrawerConfigurations();
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
- return getRequiredProfiles();
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ return getDrawerConfigurations();
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
+ return getRequiredProfiles();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -138,21 +140,20 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- getDrawerConfigurations().clear();
- getDrawerConfigurations().addAll((Collection<? extends DrawerConfiguration>) newValue);
- return;
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
- getRequiredProfiles().clear();
- getRequiredProfiles().addAll((Collection<? extends String>) newValue);
- return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ getDrawerConfigurations().clear();
+ getDrawerConfigurations().addAll((Collection<? extends DrawerConfiguration>)newValue);
+ return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
+ getRequiredProfiles().clear();
+ getRequiredProfiles().addAll((Collection<? extends String>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -160,18 +161,17 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- getDrawerConfigurations().clear();
- return;
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
- getRequiredProfiles().clear();
- return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ getDrawerConfigurations().clear();
+ return;
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
+ getRequiredProfiles().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -179,16 +179,15 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
- return drawerConfigurations != null && !drawerConfigurations.isEmpty();
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
- return requiredProfiles != null && !requiredProfiles.isEmpty();
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS:
+ return drawerConfigurations != null && !drawerConfigurations.isEmpty();
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION__REQUIRED_PROFILES:
+ return requiredProfiles != null && !requiredProfiles.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -196,14 +195,11 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (requiredProfiles: ");
@@ -212,4 +208,4 @@ public class PaletteConfigurationImpl extends ConfigurationImpl implements Palet
return result.toString();
}
-} // PaletteConfigurationImpl
+} //PaletteConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationFactoryImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationFactoryImpl.java
index b7309f3164a..ea8af9bfc85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationFactoryImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationFactoryImpl.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
@@ -10,24 +16,17 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
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.uml.diagram.paletteconfiguration.DrawerConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind;
+
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
- *
* @generated
*/
public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements PaletteconfigurationFactory {
@@ -35,16 +34,16 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static PaletteconfigurationFactory init() {
try {
- PaletteconfigurationFactory thePaletteconfigurationFactory = (PaletteconfigurationFactory) EPackage.Registry.INSTANCE.getEFactory(PaletteconfigurationPackage.eNS_URI);
+ PaletteconfigurationFactory thePaletteconfigurationFactory = (PaletteconfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(PaletteconfigurationPackage.eNS_URI);
if (thePaletteconfigurationFactory != null) {
return thePaletteconfigurationFactory;
}
- } catch (Exception exception) {
+ }
+ catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PaletteconfigurationFactoryImpl();
@@ -54,7 +53,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationFactoryImpl() {
@@ -64,67 +62,56 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION:
- return createPaletteConfiguration();
- case PaletteconfigurationPackage.TOOL_CONFIGURATION:
- return createToolConfiguration();
- case PaletteconfigurationPackage.STACK_CONFIGURATION:
- return createStackConfiguration();
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION:
- return createDrawerConfiguration();
- case PaletteconfigurationPackage.ICON_DESCRIPTOR:
- return createIconDescriptor();
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR:
- return createElementDescriptor();
- case PaletteconfigurationPackage.SEPARATOR_CONFIGURATION:
- return createSeparatorConfiguration();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION: return createPaletteConfiguration();
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION: return createToolConfiguration();
+ case PaletteconfigurationPackage.STACK_CONFIGURATION: return createStackConfiguration();
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION: return createDrawerConfiguration();
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR: return createIconDescriptor();
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR: return createElementDescriptor();
+ case PaletteconfigurationPackage.SEPARATOR_CONFIGURATION: return createSeparatorConfiguration();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
- case PaletteconfigurationPackage.TOOL_KIND:
- return createToolKindFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case PaletteconfigurationPackage.TOOL_KIND:
+ return createToolKindFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
- case PaletteconfigurationPackage.TOOL_KIND:
- return convertToolKindToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case PaletteconfigurationPackage.TOOL_KIND:
+ return convertToolKindToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteConfiguration createPaletteConfiguration() {
@@ -135,7 +122,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ToolConfiguration createToolConfiguration() {
@@ -146,7 +132,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public StackConfiguration createStackConfiguration() {
@@ -157,7 +142,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DrawerConfiguration createDrawerConfiguration() {
@@ -168,7 +152,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public IconDescriptor createIconDescriptor() {
@@ -179,7 +162,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ElementDescriptor createElementDescriptor() {
@@ -190,7 +172,6 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public SeparatorConfiguration createSeparatorConfiguration() {
@@ -201,21 +182,17 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ToolKind createToolKindFromString(EDataType eDataType, String initialValue) {
ToolKind result = ToolKind.get(initialValue);
- if (result == null) {
- throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- }
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String convertToolKindToString(EDataType eDataType, Object instanceValue) {
@@ -225,17 +202,15 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationPackage getPaletteconfigurationPackage() {
- return (PaletteconfigurationPackage) getEPackage();
+ return (PaletteconfigurationPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @deprecated
* @generated
*/
@@ -244,4 +219,4 @@ public class PaletteconfigurationFactoryImpl extends EFactoryImpl implements Pal
return PaletteconfigurationPackage.eINSTANCE;
}
-} // PaletteconfigurationFactoryImpl
+} //PaletteconfigurationFactoryImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
index 190878b94a0..3019eb4dea3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
@@ -12,7 +18,9 @@ import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
+
import org.eclipse.emf.ecore.impl.EPackageImpl;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
@@ -31,14 +39,12 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind;
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
- *
* @generated
*/
public class PaletteconfigurationPackageImpl extends EPackageImpl implements PaletteconfigurationPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass paletteConfigurationEClass = null;
@@ -46,7 +52,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass toolConfigurationEClass = null;
@@ -54,7 +59,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass stackConfigurationEClass = null;
@@ -62,7 +66,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass childConfigurationEClass = null;
@@ -70,7 +73,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass drawerConfigurationEClass = null;
@@ -78,7 +80,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass configurationEClass = null;
@@ -86,7 +87,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass iconDescriptorEClass = null;
@@ -94,7 +94,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass elementDescriptorEClass = null;
@@ -102,7 +101,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass separatorConfigurationEClass = null;
@@ -110,7 +108,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass leafConfigurationEClass = null;
@@ -118,17 +115,20 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EEnum toolKindEEnum = null;
/**
- * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * 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>
- * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage#eNS_URI
* @see #init()
@@ -141,31 +141,27 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>
- * This method is used to initialize {@link PaletteconfigurationPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
+ *
+ * <p>This method is used to initialize {@link PaletteconfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PaletteconfigurationPackage init() {
- if (isInited) {
- return (PaletteconfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(PaletteconfigurationPackage.eNS_URI);
- }
+ if (isInited) return (PaletteconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(PaletteconfigurationPackage.eNS_URI);
// Obtain or create and register package
- PaletteconfigurationPackageImpl thePaletteconfigurationPackage = (PaletteconfigurationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PaletteconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
- : new PaletteconfigurationPackageImpl());
+ PaletteconfigurationPackageImpl thePaletteconfigurationPackage = (PaletteconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PaletteconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PaletteconfigurationPackageImpl());
isInited = true;
@@ -181,7 +177,7 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
// Mark meta-data to indicate it can't be changed
thePaletteconfigurationPackage.freeze();
-
+
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PaletteconfigurationPackage.eNS_URI, thePaletteconfigurationPackage);
return thePaletteconfigurationPackage;
@@ -190,7 +186,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getPaletteConfiguration() {
@@ -200,27 +195,24 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EReference getPaletteConfiguration_DrawerConfigurations() {
- return (EReference) paletteConfigurationEClass.getEStructuralFeatures().get(0);
+ return (EReference)paletteConfigurationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getPaletteConfiguration_RequiredProfiles() {
- return (EAttribute) paletteConfigurationEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)paletteConfigurationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getToolConfiguration() {
@@ -230,27 +222,24 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getToolConfiguration_Kind() {
- return (EAttribute) toolConfigurationEClass.getEStructuralFeatures().get(0);
+ return (EAttribute)toolConfigurationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EReference getToolConfiguration_ElementDescriptors() {
- return (EReference) toolConfigurationEClass.getEStructuralFeatures().get(1);
+ return (EReference)toolConfigurationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getStackConfiguration() {
@@ -260,17 +249,15 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EReference getStackConfiguration_OwnedConfigurations() {
- return (EReference) stackConfigurationEClass.getEStructuralFeatures().get(0);
+ return (EReference)stackConfigurationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getChildConfiguration() {
@@ -280,7 +267,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getDrawerConfiguration() {
@@ -290,17 +276,15 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EReference getDrawerConfiguration_OwnedConfigurations() {
- return (EReference) drawerConfigurationEClass.getEStructuralFeatures().get(0);
+ return (EReference)drawerConfigurationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getConfiguration() {
@@ -310,47 +294,42 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getConfiguration_Id() {
- return (EAttribute) configurationEClass.getEStructuralFeatures().get(0);
+ return (EAttribute)configurationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getConfiguration_Label() {
- return (EAttribute) configurationEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)configurationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getConfiguration_Description() {
- return (EAttribute) configurationEClass.getEStructuralFeatures().get(2);
+ return (EAttribute)configurationEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EReference getConfiguration_Icon() {
- return (EReference) configurationEClass.getEStructuralFeatures().get(3);
+ return (EReference)configurationEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getIconDescriptor() {
@@ -360,27 +339,24 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getIconDescriptor_PluginID() {
- return (EAttribute) iconDescriptorEClass.getEStructuralFeatures().get(0);
+ return (EAttribute)iconDescriptorEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getIconDescriptor_IconPath() {
- return (EAttribute) iconDescriptorEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)iconDescriptorEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getElementDescriptor() {
@@ -390,27 +366,24 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getElementDescriptor_ElementTypeId() {
- return (EAttribute) elementDescriptorEClass.getEStructuralFeatures().get(0);
+ return (EAttribute)elementDescriptorEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getElementDescriptor_GraphicalHints() {
- return (EAttribute) elementDescriptorEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)elementDescriptorEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getSeparatorConfiguration() {
@@ -420,7 +393,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EClass getLeafConfiguration() {
@@ -430,7 +402,6 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EEnum getToolKind() {
@@ -440,33 +411,28 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationFactory getPaletteconfigurationFactory() {
- return (PaletteconfigurationFactory) getEFactoryInstance();
+ return (PaletteconfigurationFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
+ * Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void createPackageContents() {
- if (isCreated) {
- return;
- }
+ if (isCreated) return;
isCreated = true;
// Create classes and their features
@@ -511,23 +477,19 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
+ * Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized) {
- return;
- }
+ if (isInitialized) return;
isInitialized = true;
// Initialize package
@@ -536,7 +498,7 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
setNsURI(eNS_URI);
// Obtain other dependent packages
- EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
// Create type parameters
@@ -553,25 +515,20 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
// Initialize classes and features; add operations and parameters
initEClass(paletteConfigurationEClass, PaletteConfiguration.class, "PaletteConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getPaletteConfiguration_DrawerConfigurations(), this.getDrawerConfiguration(), null, "drawerConfigurations", null, 1, -1, PaletteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPaletteConfiguration_RequiredProfiles(), theEcorePackage.getEString(), "requiredProfiles", null, 0, -1, PaletteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
+ initEReference(getPaletteConfiguration_DrawerConfigurations(), this.getDrawerConfiguration(), null, "drawerConfigurations", null, 1, -1, PaletteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPaletteConfiguration_RequiredProfiles(), theEcorePackage.getEString(), "requiredProfiles", null, 0, -1, PaletteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(toolConfigurationEClass, ToolConfiguration.class, "ToolConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getToolConfiguration_Kind(), this.getToolKind(), "kind", "CreationTool", 1, 1, ToolConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getToolConfiguration_ElementDescriptors(), this.getElementDescriptor(), null, "elementDescriptors", null, 0, -1, ToolConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getToolConfiguration_ElementDescriptors(), this.getElementDescriptor(), null, "elementDescriptors", null, 0, -1, ToolConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(stackConfigurationEClass, StackConfiguration.class, "StackConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getStackConfiguration_OwnedConfigurations(), this.getLeafConfiguration(), null, "ownedConfigurations", null, 1, -1, StackConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStackConfiguration_OwnedConfigurations(), this.getLeafConfiguration(), null, "ownedConfigurations", null, 1, -1, StackConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(childConfigurationEClass, ChildConfiguration.class, "ChildConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(drawerConfigurationEClass, DrawerConfiguration.class, "DrawerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDrawerConfiguration_OwnedConfigurations(), this.getChildConfiguration(), null, "ownedConfigurations", null, 1, -1, DrawerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDrawerConfiguration_OwnedConfigurations(), this.getChildConfiguration(), null, "ownedConfigurations", null, 1, -1, DrawerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(configurationEClass, Configuration.class, "Configuration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getConfiguration_Id(), theEcorePackage.getEString(), "id", null, 1, 1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -600,4 +557,4 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
createResource(eNS_URI);
}
-} // PaletteconfigurationPackageImpl
+} //PaletteconfigurationPackageImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/SeparatorConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/SeparatorConfigurationImpl.java
index eb44c633527..c289245f3ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/SeparatorConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/SeparatorConfigurationImpl.java
@@ -1,12 +1,19 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import org.eclipse.emf.ecore.EClass;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
@@ -14,8 +21,6 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfigurati
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Separator Configuration</b></em>'.
* <!-- end-user-doc -->
- * <p>
- * </p>
*
* @generated
*/
@@ -23,7 +28,6 @@ public class SeparatorConfigurationImpl extends LeafConfigurationImpl implements
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected SeparatorConfigurationImpl() {
@@ -33,7 +37,6 @@ public class SeparatorConfigurationImpl extends LeafConfigurationImpl implements
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -41,4 +44,4 @@ public class SeparatorConfigurationImpl extends LeafConfigurationImpl implements
return PaletteconfigurationPackage.Literals.SEPARATOR_CONFIGURATION;
}
-} // SeparatorConfigurationImpl
+} //SeparatorConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/StackConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/StackConfigurationImpl.java
index 088c5189988..e15f6262e2c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/StackConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/StackConfigurationImpl.java
@@ -1,19 +1,29 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
+
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
@@ -24,10 +34,10 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl#getOwnedConfigurations <em>Owned Configurations</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.StackConfigurationImpl#getOwnedConfigurations <em>Owned Configurations</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -36,7 +46,6 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
* The cached value of the '{@link #getOwnedConfigurations() <em>Owned Configurations</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getOwnedConfigurations()
* @generated
* @ordered
@@ -46,7 +55,6 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected StackConfigurationImpl() {
@@ -56,7 +64,6 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -67,7 +74,6 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<LeafConfiguration> getOwnedConfigurations() {
@@ -80,14 +86,13 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- return ((InternalEList<?>) getOwnedConfigurations()).basicRemove(otherEnd, msgs);
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return ((InternalEList<?>)getOwnedConfigurations()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -95,14 +100,13 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- return getOwnedConfigurations();
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return getOwnedConfigurations();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -110,17 +114,16 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- getOwnedConfigurations().clear();
- getOwnedConfigurations().addAll((Collection<? extends LeafConfiguration>) newValue);
- return;
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ getOwnedConfigurations().clear();
+ getOwnedConfigurations().addAll((Collection<? extends LeafConfiguration>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -128,15 +131,14 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- getOwnedConfigurations().clear();
- return;
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ getOwnedConfigurations().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -144,16 +146,15 @@ public class StackConfigurationImpl extends ChildConfigurationImpl implements St
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
- return ownedConfigurations != null && !ownedConfigurations.isEmpty();
+ case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS:
+ return ownedConfigurations != null && !ownedConfigurations.isEmpty();
}
return super.eIsSet(featureID);
}
-} // StackConfigurationImpl
+} //StackConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ToolConfigurationImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ToolConfigurationImpl.java
index f08dade7c86..cea4c7969d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ToolConfigurationImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/impl/ToolConfigurationImpl.java
@@ -1,8 +1,14 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl;
@@ -10,12 +16,17 @@ import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
+
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
@@ -27,11 +38,11 @@ import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolKind;
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl#getElementDescriptors <em>Element Descriptors</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.ToolConfigurationImpl#getElementDescriptors <em>Element Descriptors</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -40,7 +51,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
* The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getKind()
* @generated
* @ordered
@@ -51,7 +61,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
* The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getKind()
* @generated
* @ordered
@@ -62,7 +71,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
* The cached value of the '{@link #getElementDescriptors() <em>Element Descriptors</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getElementDescriptors()
* @generated
* @ordered
@@ -72,7 +80,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected ToolConfigurationImpl() {
@@ -82,7 +89,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -93,7 +99,6 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public ToolKind getKind() {
@@ -103,21 +108,18 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setKind(ToolKind newKind) {
ToolKind oldKind = kind;
kind = newKind == null ? KIND_EDEFAULT : newKind;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND, oldKind, kind));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<ElementDescriptor> getElementDescriptors() {
@@ -130,14 +132,13 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- return ((InternalEList<?>) getElementDescriptors()).basicRemove(otherEnd, msgs);
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ return ((InternalEList<?>)getElementDescriptors()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -145,16 +146,15 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
- return getKind();
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- return getElementDescriptors();
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
+ return getKind();
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ return getElementDescriptors();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -162,20 +162,19 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
- setKind((ToolKind) newValue);
- return;
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- getElementDescriptors().clear();
- getElementDescriptors().addAll((Collection<? extends ElementDescriptor>) newValue);
- return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
+ setKind((ToolKind)newValue);
+ return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ getElementDescriptors().clear();
+ getElementDescriptors().addAll((Collection<? extends ElementDescriptor>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -183,18 +182,17 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
- setKind(KIND_EDEFAULT);
- return;
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- getElementDescriptors().clear();
- return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
+ setKind(KIND_EDEFAULT);
+ return;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ getElementDescriptors().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -202,16 +200,15 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
- return kind != KIND_EDEFAULT;
- case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
- return elementDescriptors != null && !elementDescriptors.isEmpty();
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND:
+ return kind != KIND_EDEFAULT;
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS:
+ return elementDescriptors != null && !elementDescriptors.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -219,14 +216,11 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (kind: ");
@@ -235,4 +229,4 @@ public class ToolConfigurationImpl extends LeafConfigurationImpl implements Tool
return result.toString();
}
-} // ToolConfigurationImpl
+} //ToolConfigurationImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
index 8667f72886d..e3351b7b65f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
@@ -1,33 +1,31 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
+
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
+
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.*;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage
* @generated
*/
@@ -36,7 +34,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected static PaletteconfigurationPackage modelPackage;
@@ -45,7 +42,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationAdapterFactory() {
@@ -59,7 +55,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
- *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -69,7 +64,7 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
return true;
}
if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -78,80 +73,67 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected PaletteconfigurationSwitch<Adapter> modelSwitch =
- new PaletteconfigurationSwitch<Adapter>() {
- @Override
- public Adapter casePaletteConfiguration(PaletteConfiguration object) {
- return createPaletteConfigurationAdapter();
- }
-
- @Override
- public Adapter caseToolConfiguration(ToolConfiguration object) {
- return createToolConfigurationAdapter();
- }
-
- @Override
- public Adapter caseStackConfiguration(StackConfiguration object) {
- return createStackConfigurationAdapter();
- }
-
- @Override
- public Adapter caseChildConfiguration(ChildConfiguration object) {
- return createChildConfigurationAdapter();
- }
-
- @Override
- public Adapter caseDrawerConfiguration(DrawerConfiguration object) {
- return createDrawerConfigurationAdapter();
- }
-
- @Override
- public Adapter caseConfiguration(Configuration object) {
- return createConfigurationAdapter();
- }
-
- @Override
- public Adapter caseIconDescriptor(IconDescriptor object) {
- return createIconDescriptorAdapter();
- }
-
- @Override
- public Adapter caseElementDescriptor(ElementDescriptor object) {
- return createElementDescriptorAdapter();
- }
-
- @Override
- public Adapter caseSeparatorConfiguration(SeparatorConfiguration object) {
- return createSeparatorConfigurationAdapter();
- }
-
- @Override
- public Adapter caseLeafConfiguration(LeafConfiguration object) {
- return createLeafConfigurationAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ new PaletteconfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter casePaletteConfiguration(PaletteConfiguration object) {
+ return createPaletteConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseToolConfiguration(ToolConfiguration object) {
+ return createToolConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseStackConfiguration(StackConfiguration object) {
+ return createStackConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseChildConfiguration(ChildConfiguration object) {
+ return createChildConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseDrawerConfiguration(DrawerConfiguration object) {
+ return createDrawerConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseConfiguration(Configuration object) {
+ return createConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseIconDescriptor(IconDescriptor object) {
+ return createIconDescriptorAdapter();
+ }
+ @Override
+ public Adapter caseElementDescriptor(ElementDescriptor object) {
+ return createElementDescriptorAdapter();
+ }
+ @Override
+ public Adapter caseSeparatorConfiguration(SeparatorConfiguration object) {
+ return createSeparatorConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseLeafConfiguration(LeafConfiguration object) {
+ return createLeafConfigurationAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param target
- * the object to adapt.
+ * @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject) target);
+ return modelSwitch.doSwitch((EObject)target);
}
@@ -161,7 +143,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.PaletteConfiguration
* @generated
@@ -176,7 +157,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.ToolConfiguration
* @generated
@@ -191,7 +171,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.StackConfiguration
* @generated
@@ -206,7 +185,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.ChildConfiguration
* @generated
@@ -221,7 +199,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.DrawerConfiguration
* @generated
@@ -236,7 +213,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.Configuration
* @generated
@@ -251,7 +227,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.IconDescriptor
* @generated
@@ -266,7 +241,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.ElementDescriptor
* @generated
@@ -281,7 +255,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.SeparatorConfiguration
* @generated
@@ -296,7 +269,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* 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.uml.diagram.paletteconfiguration.LeafConfiguration
* @generated
@@ -310,7 +282,6 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
- *
* @return the new adapter.
* @generated
*/
@@ -318,4 +289,4 @@ public class PaletteconfigurationAdapterFactory extends AdapterFactoryImpl {
return null;
}
-} // PaletteconfigurationAdapterFactory
+} //PaletteconfigurationAdapterFactory
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceFactoryImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceFactoryImpl.java
index 537c68cb8db..0b12e4f44c7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceFactoryImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceFactoryImpl.java
@@ -1,20 +1,27 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.util;
import org.eclipse.emf.common.util.URI;
+
import org.eclipse.emf.ecore.resource.Resource;
+
import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
/**
* <!-- begin-user-doc -->
* The <b>Resource Factory</b> associated with the package.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationResourceImpl
* @generated
*/
@@ -23,7 +30,6 @@ public class PaletteconfigurationResourceFactoryImpl extends ResourceFactoryImpl
* Creates an instance of the resource factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationResourceFactoryImpl() {
@@ -34,7 +40,6 @@ public class PaletteconfigurationResourceFactoryImpl extends ResourceFactoryImpl
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -43,4 +48,4 @@ public class PaletteconfigurationResourceFactoryImpl extends ResourceFactoryImpl
return result;
}
-} // PaletteconfigurationResourceFactoryImpl
+} //PaletteconfigurationResourceFactoryImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceImpl.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceImpl.java
index 4b800f227c5..72eec7d00c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceImpl.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationResourceImpl.java
@@ -1,19 +1,25 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.util;
import org.eclipse.emf.common.util.URI;
+
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
/**
* <!-- begin-user-doc -->
* The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationResourceFactoryImpl
* @generated
*/
@@ -22,13 +28,11 @@ public class PaletteconfigurationResourceImpl extends XMLResourceImpl {
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param uri
- * the URI of the new resource.
+ * @param uri the URI of the new resource.
* @generated
*/
public PaletteconfigurationResourceImpl(URI uri) {
super(uri);
}
-} // PaletteconfigurationResourceImpl
+} //PaletteconfigurationResourceImpl
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationSwitch.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationSwitch.java
index 1e7ef4a877c..beeeb6ec055 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationSwitch.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationSwitch.java
@@ -1,36 +1,34 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
+
import org.eclipse.emf.ecore.util.Switch;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
-import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
+
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.*;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage
* @generated
*/
@@ -39,7 +37,6 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected static PaletteconfigurationPackage modelPackage;
@@ -48,7 +45,6 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationSwitch() {
@@ -61,8 +57,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @parameter ePackage the package in question.
+ * @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@@ -75,134 +70,86 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case PaletteconfigurationPackage.PALETTE_CONFIGURATION: {
- PaletteConfiguration paletteConfiguration = (PaletteConfiguration) theEObject;
- T result = casePaletteConfiguration(paletteConfiguration);
- if (result == null) {
- result = caseConfiguration(paletteConfiguration);
+ case PaletteconfigurationPackage.PALETTE_CONFIGURATION: {
+ PaletteConfiguration paletteConfiguration = (PaletteConfiguration)theEObject;
+ T result = casePaletteConfiguration(paletteConfiguration);
+ if (result == null) result = caseConfiguration(paletteConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = defaultCase(theEObject);
+ case PaletteconfigurationPackage.TOOL_CONFIGURATION: {
+ ToolConfiguration toolConfiguration = (ToolConfiguration)theEObject;
+ T result = caseToolConfiguration(toolConfiguration);
+ if (result == null) result = caseLeafConfiguration(toolConfiguration);
+ if (result == null) result = caseChildConfiguration(toolConfiguration);
+ if (result == null) result = caseConfiguration(toolConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- return result;
- }
- case PaletteconfigurationPackage.TOOL_CONFIGURATION: {
- ToolConfiguration toolConfiguration = (ToolConfiguration) theEObject;
- T result = caseToolConfiguration(toolConfiguration);
- if (result == null) {
- result = caseLeafConfiguration(toolConfiguration);
+ case PaletteconfigurationPackage.STACK_CONFIGURATION: {
+ StackConfiguration stackConfiguration = (StackConfiguration)theEObject;
+ T result = caseStackConfiguration(stackConfiguration);
+ if (result == null) result = caseChildConfiguration(stackConfiguration);
+ if (result == null) result = caseConfiguration(stackConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = caseChildConfiguration(toolConfiguration);
+ case PaletteconfigurationPackage.CHILD_CONFIGURATION: {
+ ChildConfiguration childConfiguration = (ChildConfiguration)theEObject;
+ T result = caseChildConfiguration(childConfiguration);
+ if (result == null) result = caseConfiguration(childConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = caseConfiguration(toolConfiguration);
+ case PaletteconfigurationPackage.DRAWER_CONFIGURATION: {
+ DrawerConfiguration drawerConfiguration = (DrawerConfiguration)theEObject;
+ T result = caseDrawerConfiguration(drawerConfiguration);
+ if (result == null) result = caseConfiguration(drawerConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = defaultCase(theEObject);
+ case PaletteconfigurationPackage.CONFIGURATION: {
+ Configuration configuration = (Configuration)theEObject;
+ T result = caseConfiguration(configuration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- return result;
- }
- case PaletteconfigurationPackage.STACK_CONFIGURATION: {
- StackConfiguration stackConfiguration = (StackConfiguration) theEObject;
- T result = caseStackConfiguration(stackConfiguration);
- if (result == null) {
- result = caseChildConfiguration(stackConfiguration);
+ case PaletteconfigurationPackage.ICON_DESCRIPTOR: {
+ IconDescriptor iconDescriptor = (IconDescriptor)theEObject;
+ T result = caseIconDescriptor(iconDescriptor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = caseConfiguration(stackConfiguration);
- }
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case PaletteconfigurationPackage.CHILD_CONFIGURATION: {
- ChildConfiguration childConfiguration = (ChildConfiguration) theEObject;
- T result = caseChildConfiguration(childConfiguration);
- if (result == null) {
- result = caseConfiguration(childConfiguration);
+ case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR: {
+ ElementDescriptor elementDescriptor = (ElementDescriptor)theEObject;
+ T result = caseElementDescriptor(elementDescriptor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- if (result == null) {
- result = defaultCase(theEObject);
+ case PaletteconfigurationPackage.SEPARATOR_CONFIGURATION: {
+ SeparatorConfiguration separatorConfiguration = (SeparatorConfiguration)theEObject;
+ T result = caseSeparatorConfiguration(separatorConfiguration);
+ if (result == null) result = caseLeafConfiguration(separatorConfiguration);
+ if (result == null) result = caseChildConfiguration(separatorConfiguration);
+ if (result == null) result = caseConfiguration(separatorConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- return result;
- }
- case PaletteconfigurationPackage.DRAWER_CONFIGURATION: {
- DrawerConfiguration drawerConfiguration = (DrawerConfiguration) theEObject;
- T result = caseDrawerConfiguration(drawerConfiguration);
- if (result == null) {
- result = caseConfiguration(drawerConfiguration);
- }
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case PaletteconfigurationPackage.CONFIGURATION: {
- Configuration configuration = (Configuration) theEObject;
- T result = caseConfiguration(configuration);
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case PaletteconfigurationPackage.ICON_DESCRIPTOR: {
- IconDescriptor iconDescriptor = (IconDescriptor) theEObject;
- T result = caseIconDescriptor(iconDescriptor);
- if (result == null) {
- result = defaultCase(theEObject);
+ case PaletteconfigurationPackage.LEAF_CONFIGURATION: {
+ LeafConfiguration leafConfiguration = (LeafConfiguration)theEObject;
+ T result = caseLeafConfiguration(leafConfiguration);
+ if (result == null) result = caseChildConfiguration(leafConfiguration);
+ if (result == null) result = caseConfiguration(leafConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- return result;
- }
- case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR: {
- ElementDescriptor elementDescriptor = (ElementDescriptor) theEObject;
- T result = caseElementDescriptor(elementDescriptor);
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case PaletteconfigurationPackage.SEPARATOR_CONFIGURATION: {
- SeparatorConfiguration separatorConfiguration = (SeparatorConfiguration) theEObject;
- T result = caseSeparatorConfiguration(separatorConfiguration);
- if (result == null) {
- result = caseLeafConfiguration(separatorConfiguration);
- }
- if (result == null) {
- result = caseChildConfiguration(separatorConfiguration);
- }
- if (result == null) {
- result = caseConfiguration(separatorConfiguration);
- }
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case PaletteconfigurationPackage.LEAF_CONFIGURATION: {
- LeafConfiguration leafConfiguration = (LeafConfiguration) theEObject;
- T result = caseLeafConfiguration(leafConfiguration);
- if (result == null) {
- result = caseChildConfiguration(leafConfiguration);
- }
- if (result == null) {
- result = caseConfiguration(leafConfiguration);
- }
- if (result == null) {
- result = defaultCase(theEObject);
- }
- return result;
- }
- default:
- return defaultCase(theEObject);
+ default: return defaultCase(theEObject);
}
}
@@ -212,9 +159,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Palette Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -229,9 +174,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Tool Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -246,9 +189,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Stack Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -263,9 +204,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Child Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -280,9 +219,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Drawer Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -297,9 +234,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -314,9 +249,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Icon Descriptor</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -331,9 +264,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Element Descriptor</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -348,9 +279,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Separator Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -365,9 +294,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Leaf Configuration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -382,9 +309,7 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
@@ -394,4 +319,4 @@ public class PaletteconfigurationSwitch<T> extends Switch<T> {
return null;
}
-} // PaletteconfigurationSwitch
+} //PaletteconfigurationSwitch
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationXMLProcessor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationXMLProcessor.java
index c9585ef5354..31f7948a539 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationXMLProcessor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/util/PaletteconfigurationXMLProcessor.java
@@ -1,23 +1,31 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.paletteconfiguration.util;
import java.util.Map;
import org.eclipse.emf.ecore.EPackage;
+
import org.eclipse.emf.ecore.resource.Resource;
+
import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
/**
* This class contains helper methods to serialize and deserialize XML documents
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public class PaletteconfigurationXMLProcessor extends XMLProcessor {
@@ -26,19 +34,17 @@ public class PaletteconfigurationXMLProcessor extends XMLProcessor {
* Public constructor to instantiate the helper.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public PaletteconfigurationXMLProcessor() {
super((EPackage.Registry.INSTANCE));
PaletteconfigurationPackage.eINSTANCE.eClass();
}
-
+
/**
* Register for "*" and "xml" file extensions the PaletteconfigurationResourceFactoryImpl factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,4 +57,4 @@ public class PaletteconfigurationXMLProcessor extends XMLProcessor {
return registrations;
}
-} // PaletteconfigurationXMLProcessor
+} //PaletteconfigurationXMLProcessor
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomStateResizeCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomStateResizeCommand.java
index 72caba82472..e5d51db736f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomStateResizeCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomStateResizeCommand.java
@@ -28,6 +28,7 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCo
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomStateEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.helpers.Zone;
public class CustomStateResizeCommand extends AbstractTransactionalCommand {
@@ -61,7 +62,8 @@ public class CustomStateResizeCommand extends AbstractTransactionalCommand {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
View state = (View) adaptable.getAdapter(View.class);
View stateLabel = (View) state.getChildren().get(0);
- View stateCompartment = (View) state.getChildren().get(1);
+ View stateCompartment = CustomStateEditPart.getStateCompartmentView(state);
+
// a bunch of initializations
int direction = request.getResizeDirection();
int dx = request.getSizeDelta().width;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java
index 922afc79146..195da33523f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java
@@ -23,12 +23,10 @@ public class CustomStateCompartmentEditPart extends StateCompartmentEditPart {
public CustomStateCompartmentEditPart(View view) {
super(view);
- // TODO Auto-generated constructor stub
}
@Override
protected void createDefaultEditPolicies() {
- // TODO Auto-generated method stub
super.createDefaultEditPolicies();
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
removeEditPolicy(EditPolicyRoles.POPUPBAR_ROLE);
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 30416c04930..78133c9bfdf 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
@@ -13,6 +13,7 @@ package org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPart;
public class CustomStateEditPart extends StateEditPart {
@@ -23,7 +24,6 @@ public class CustomStateEditPart extends StateEditPart {
@Override
protected void createDefaultEditPolicies() {
- // TODO Auto-generated method stub
super.createDefaultEditPolicies();
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
removeEditPolicy(EditPolicyRoles.POPUPBAR_ROLE);
@@ -49,4 +49,23 @@ public class CustomStateEditPart extends StateEditPart {
protected int getDefaultCornerWidth() {
return 20;
}
+
+ /**
+ * obtain the state compartment view when the view of the state is given.
+ *
+ * @param stateView
+ * the view of the state
+ * @return the view representing the state compartment
+ */
+ public static View getStateCompartmentView(View stateView) {
+ for (Object viewObj : stateView.getChildren()) {
+ if (viewObj instanceof View) {
+ View view = (View) viewObj;
+ if (view.getType().equals("" + StateCompartmentEditPart.VISUAL_ID)) { //$NON-NLS-1$
+ return view;
+ }
+ }
+ }
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java
index f95cc966d2c..41820f6d86f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java
@@ -82,9 +82,9 @@ public class CustomStateNameEditPart extends StateNameEditPart {
if (stateView == null) {
return;
}
- View stateCompartView = (View) stateView.getChildren().get(1);
+ View stateCompartmentView = CustomStateEditPart.getStateCompartmentView(stateView);
- if (stateCompartView.getChildren().isEmpty()) {
+ if (stateCompartmentView.getChildren().isEmpty()) {
stateFigure.getStateCompartmentFigure().setVisible(false);
} else {
stateFigure.getStateCompartmentFigure().setVisible(true);
@@ -103,7 +103,7 @@ public class CustomStateNameEditPart extends StateNameEditPart {
// AutomaticCompartmentLayoutManager add extra space on top of the first label which would not be accounted for
// when adding the space for the labels.
int height = 0;
- if (stateCompartView.isVisible() && (stateFigure.getStateCompartmentFigure() != null)) {
+ if (stateCompartmentView.isVisible() && (stateFigure.getStateCompartmentFigure() != null)) {
stateFigure.validate(); // validate the figure, assure that layout manager is called.
height = stateFigure.getStateCompartmentFigure().getBounds().y - stateFigure.getBounds().y + 1;
// Sanity check
@@ -118,7 +118,7 @@ public class CustomStateNameEditPart extends StateNameEditPart {
int stateHeight = Zone.getHeight(stateView);
int stateWidth = Zone.getWidth(stateView);
- int stateCompartHeight = Zone.getHeight(stateCompartView);
+ int stateCompartHeight = Zone.getHeight(stateCompartmentView);
if (stateCompartHeight == 0) {
// stateCompartHeight is 0 after creation, get height from figure
// stateCompartHeight = stateFigure.getStateCompartmentFigure().getBounds().height;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateCreationEditPolicy.java
index aadbdcd527d..2ac093506be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateCreationEditPolicy.java
@@ -38,6 +38,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomFirstRegionInCompositeStateCreateElementCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomVertexCreateElementCommand;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomStateEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.helpers.Zone;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
@@ -68,7 +69,8 @@ public class CustomStateCreationEditPolicy extends CreationEditPolicy {
// starting point is the state node on
// which mouse was moving
View stateView = (View) getHost().getModel();
- View stateCompartmentView = (View) stateView.getChildren().get(1);
+ View stateCompartmentView = CustomStateEditPart.getStateCompartmentView(stateView);
+
// get and adaptable for it, to pass on to commands
IAdaptable adaptableForStateCompartmentView = new SemanticAdapter(null, stateCompartmentView);
if (!stateCompartmentView.getChildren().isEmpty()) {

Back to the top